/* Generated by Cython 3.0.0a11 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "libpg_query/pg_query.h",
            "libpg_query/protobuf/pg_query.pb-c.h",
            "libpg_query/src/pg_query_internal.h",
            "libpg_query/vendor/protobuf-c/protobuf-c.h"
        ],
        "include_dirs": [
            "libpg_query",
            "libpg_query/src/postgres/include",
            "libpg_query/vendor"
        ],
        "libraries": [
            "pg_query"
        ],
        "library_dirs": [
            "libpg_query"
        ],
        "name": "pglast.parser",
        "sources": [
            "pglast/parser.pyx"
        ]
    },
    "module_name": "pglast.parser"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#define CYTHON_ABI "3_0_0a11"
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x030000AB
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
  #endif
#elif defined(CYTHON_LIMITED_API)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS 1
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(p))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#ifndef CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE(obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

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

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

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

#define __PYX_HAVE__pglast__parser
#define __PYX_HAVE_API__pglast__parser
/* Early includes */
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <limits.h>
#include "postgres.h"
#include "nodes/bitmapset.h"
#include "nodes/pg_list.h"
#include "nodes/value.h"
#include "nodes/parsenodes.h"
#include "nodes/primnodes.h"
#include "pg_query.h"
#include "src/pg_query_internal.h"
#include "protobuf-c/protobuf-c.h"
#include "protobuf/pg_query.pb-c.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


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

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

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

static const char *__pyx_f[] = {
  "pglast/ast.pyx",
  "pglast/parser.pyx",
  "<stringsource>",
  "env/lib/python3.10/site-packages/Cython/Includes/cpython/type.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_6pglast_6parser_Displacements;
union __pyx_t_6pglast_7structs_ValUnion;
typedef union __pyx_t_6pglast_7structs_ValUnion __pyx_t_6pglast_7structs_ValUnion;

/* "structs.pxd":66
 * 
 * # ValUnion is a private type of the A_Const node, we need to redefine it here
 * ctypedef union ValUnion:             # <<<<<<<<<<<<<<
 *     Node node;
 *     Integer ival;
 */
union __pyx_t_6pglast_7structs_ValUnion {
  Node node;
  Integer ival;
  Float fval;
  Boolean boolval;
  String sval;
  BitString bsval;
};

/* "pglast/parser.pyx":175
 * 
 * 
 * cdef class Displacements:             # <<<<<<<<<<<<<<
 *     """
 *     Helper class used to find the index of Unicode character from its offset in the
 */
struct __pyx_obj_6pglast_6parser_Displacements {
  PyObject_HEAD
  PyObject *displacements;
  unsigned long max_offset;
};

/* #### Code section: utility_code_proto ### */

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

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

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

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

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

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

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

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

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

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

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

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

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

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

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

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

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

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

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

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

/* fastcall.proto */
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

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

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

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

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

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* unicode_iter.proto */
static CYTHON_INLINE int __Pyx_init_unicode_iteration(
    PyObject* ustring, Py_ssize_t *length, void** data, int *kind);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

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

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

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

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

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

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

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

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

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

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

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

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

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

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

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

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

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

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
static CYTHON_UNUSED int __Pyx_PyType_Ready(PyTypeObject *t);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetupReduce.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce(PyObject* type_obj);
#endif

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
#if __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size);
#endif

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

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

/* FetchSharedCythonModule.proto */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

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

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

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

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1
    PyObject *func_classobj;
#endif
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_CyFunctionType = 0;
#endif
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_IsCyOrPyCFunction(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

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

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

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

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

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

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

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

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

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

static PyObject* __pyx_convert__to_py_Node(Node s);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CmdType(CmdType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_QuerySource(QuerySource value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_bool(bool value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OverridingKind(OverridingKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_LimitOption(LimitOption value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_A_Expr_Kind(A_Expr_Kind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RoleSpecType(RoleSpecType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CoercionForm(CoercionForm value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SortByDir(SortByDir value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SortByNulls(SortByNulls value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DefElemAction(DefElemAction value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_LockClauseStrength(LockClauseStrength value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_LockWaitPolicy(LockWaitPolicy value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_XmlOptionType(XmlOptionType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PartitionRangeDatumKind(PartitionRangeDatumKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RTEKind(RTEKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_JoinType(JoinType value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_WCOKind(WCOKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_GroupingSetKind(GroupingSetKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OnConflictAction(OnConflictAction value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CTEMaterialize(CTEMaterialize value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SetOperation(SetOperation value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ObjectType(ObjectType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterTableType(AlterTableType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DropBehavior(DropBehavior value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_GrantTargetType(GrantTargetType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_VariableSetKind(VariableSetKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OnCommitAction(OnCommitAction value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ConstrType(ConstrType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ImportForeignSchemaType(ImportForeignSchemaType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RoleStmtType(RoleStmtType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FetchDirection(FetchDirection value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FunctionParameterMode(FunctionParameterMode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_TransactionStmtKind(TransactionStmtKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ViewCheckOption(ViewCheckOption value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DiscardMode(DiscardMode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ReindexObjectType(ReindexObjectType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CoercionContext(CoercionContext value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterTSConfigType(AlterTSConfigType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PublicationObjSpecType(PublicationObjSpecType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterPublicationAction(AlterPublicationAction value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterSubscriptionType(AlterSubscriptionType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ParamKind(ParamKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AggSplit(AggSplit value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BoolExprType(BoolExprType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SubLinkType(SubLinkType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RowCompareType(RowCompareType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MinMaxOp(MinMaxOp value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SQLValueFunctionOp(SQLValueFunctionOp value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_XmlExprOp(XmlExprOp value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NullTestType(NullTestType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BoolTestType(BoolTestType value);

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from "cpython.bytes" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "cpython.list" */
#if !CYTHON_USE_MODULE_STATE
#endif

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

/* Module declarations from "libc" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "libc.limits" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "pglast" */
#if !CYTHON_USE_MODULE_STATE
#endif

/* Module declarations from "pglast.structs" */
#if !CYTHON_USE_MODULE_STATE
#endif

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

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

/* Module declarations from "pglast.parser" */
#if !CYTHON_USE_MODULE_STATE
static PyTypeObject *__pyx_ptype_6pglast_6parser_Displacements = 0;
#endif
static PyObject *__pyx_f_6pglast_6parser__pg_bitmapset_to_set(Bitmapset const *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser__pg_str_to_decimal(char const *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser__pg_list_to_tuple(List const *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Query(Query *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TypeName(TypeName *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ColumnRef(ColumnRef *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ParamRef(ParamRef *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_A_Expr(A_Expr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TypeCast(TypeCast *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CollateClause(CollateClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RoleSpec(RoleSpec *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_FuncCall(FuncCall *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_A_Star(A_Star *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_A_Indices(A_Indices *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_A_Indirection(A_Indirection *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_A_ArrayExpr(A_ArrayExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ResTarget(ResTarget *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_MultiAssignRef(MultiAssignRef *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SortBy(SortBy *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_WindowDef(WindowDef *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeSubselect(RangeSubselect *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeFunction(RangeFunction *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeTableFunc(RangeTableFunc *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeTableFuncCol(RangeTableFuncCol *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeTableSample(RangeTableSample *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ColumnDef(ColumnDef *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TableLikeClause(TableLikeClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_IndexElem(IndexElem *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DefElem(DefElem *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_LockingClause(LockingClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_XmlSerialize(XmlSerialize *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PartitionElem(PartitionElem *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PartitionSpec(PartitionSpec *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PartitionBoundSpec(PartitionBoundSpec *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PartitionRangeDatum(PartitionRangeDatum *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PartitionCmd(PartitionCmd *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeTblEntry(RangeTblEntry *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeTblFunction(RangeTblFunction *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TableSampleClause(TableSampleClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_WithCheckOption(WithCheckOption *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SortGroupClause(SortGroupClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_GroupingSet(GroupingSet *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_WindowClause(WindowClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RowMarkClause(RowMarkClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_WithClause(WithClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_InferClause(InferClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_OnConflictClause(OnConflictClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CTESearchClause(CTESearchClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CTECycleClause(CTECycleClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CommonTableExpr(CommonTableExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_MergeWhenClause(MergeWhenClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_MergeAction(MergeAction *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TriggerTransition(TriggerTransition *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RawStmt(RawStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_InsertStmt(InsertStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DeleteStmt(DeleteStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_UpdateStmt(UpdateStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_MergeStmt(MergeStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SelectStmt(SelectStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SetOperationStmt(SetOperationStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ReturnStmt(ReturnStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PLAssignStmt(PLAssignStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateSchemaStmt(CreateSchemaStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterTableStmt(AlterTableStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ReplicaIdentityStmt(ReplicaIdentityStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterTableCmd(AlterTableCmd *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterCollationStmt(AlterCollationStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterDomainStmt(AlterDomainStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_GrantStmt(GrantStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ObjectWithArgs(ObjectWithArgs *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AccessPriv(AccessPriv *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_GrantRoleStmt(GrantRoleStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterDefaultPrivilegesStmt(AlterDefaultPrivilegesStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CopyStmt(CopyStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_VariableSetStmt(VariableSetStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_VariableShowStmt(VariableShowStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateStmt(CreateStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Constraint(Constraint *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateTableSpaceStmt(CreateTableSpaceStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DropTableSpaceStmt(DropTableSpaceStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterTableSpaceOptionsStmt(AlterTableSpaceOptionsStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterTableMoveAllStmt(AlterTableMoveAllStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateExtensionStmt(CreateExtensionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterExtensionStmt(AlterExtensionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterExtensionContentsStmt(AlterExtensionContentsStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateFdwStmt(CreateFdwStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterFdwStmt(AlterFdwStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateForeignServerStmt(CreateForeignServerStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterForeignServerStmt(AlterForeignServerStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateForeignTableStmt(CreateForeignTableStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateUserMappingStmt(CreateUserMappingStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterUserMappingStmt(AlterUserMappingStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DropUserMappingStmt(DropUserMappingStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ImportForeignSchemaStmt(ImportForeignSchemaStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreatePolicyStmt(CreatePolicyStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterPolicyStmt(AlterPolicyStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateAmStmt(CreateAmStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateTrigStmt(CreateTrigStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateEventTrigStmt(CreateEventTrigStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterEventTrigStmt(AlterEventTrigStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreatePLangStmt(CreatePLangStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateRoleStmt(CreateRoleStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterRoleStmt(AlterRoleStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterRoleSetStmt(AlterRoleSetStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DropRoleStmt(DropRoleStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateSeqStmt(CreateSeqStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterSeqStmt(AlterSeqStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DefineStmt(DefineStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateDomainStmt(CreateDomainStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateOpClassStmt(CreateOpClassStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateOpClassItem(CreateOpClassItem *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateOpFamilyStmt(CreateOpFamilyStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterOpFamilyStmt(AlterOpFamilyStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DropStmt(DropStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TruncateStmt(TruncateStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CommentStmt(CommentStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SecLabelStmt(SecLabelStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DeclareCursorStmt(DeclareCursorStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ClosePortalStmt(ClosePortalStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_FetchStmt(FetchStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_IndexStmt(IndexStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateStatsStmt(CreateStatsStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_StatsElem(StatsElem *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterStatsStmt(AlterStatsStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateFunctionStmt(CreateFunctionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_FunctionParameter(FunctionParameter *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterFunctionStmt(AlterFunctionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DoStmt(DoStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_InlineCodeBlock(InlineCodeBlock *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CallStmt(CallStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CallContext(CallContext *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RenameStmt(RenameStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterObjectDependsStmt(AlterObjectDependsStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterObjectSchemaStmt(AlterObjectSchemaStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterOwnerStmt(AlterOwnerStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterOperatorStmt(AlterOperatorStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterTypeStmt(AlterTypeStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RuleStmt(RuleStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_NotifyStmt(NotifyStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ListenStmt(ListenStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_UnlistenStmt(UnlistenStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TransactionStmt(TransactionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CompositeTypeStmt(CompositeTypeStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateEnumStmt(CreateEnumStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateRangeStmt(CreateRangeStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterEnumStmt(AlterEnumStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ViewStmt(ViewStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_LoadStmt(LoadStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreatedbStmt(CreatedbStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterDatabaseStmt(AlterDatabaseStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterDatabaseRefreshCollStmt(AlterDatabaseRefreshCollStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterDatabaseSetStmt(AlterDatabaseSetStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DropdbStmt(DropdbStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterSystemStmt(AlterSystemStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ClusterStmt(ClusterStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_VacuumStmt(VacuumStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_VacuumRelation(VacuumRelation *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ExplainStmt(ExplainStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateTableAsStmt(CreateTableAsStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RefreshMatViewStmt(RefreshMatViewStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CheckPointStmt(CheckPointStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DiscardStmt(DiscardStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_LockStmt(LockStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ConstraintsSetStmt(ConstraintsSetStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ReindexStmt(ReindexStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateConversionStmt(CreateConversionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateCastStmt(CreateCastStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateTransformStmt(CreateTransformStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PrepareStmt(PrepareStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ExecuteStmt(ExecuteStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DeallocateStmt(DeallocateStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DropOwnedStmt(DropOwnedStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ReassignOwnedStmt(ReassignOwnedStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterTSDictionaryStmt(AlterTSDictionaryStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterTSConfigurationStmt(AlterTSConfigurationStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PublicationTable(PublicationTable *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_PublicationObjSpec(PublicationObjSpec *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreatePublicationStmt(CreatePublicationStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterPublicationStmt(AlterPublicationStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CreateSubscriptionStmt(CreateSubscriptionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlterSubscriptionStmt(AlterSubscriptionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_DropSubscriptionStmt(DropSubscriptionStmt *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Alias(Alias *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeVar(RangeVar *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TableFunc(TableFunc *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_IntoClause(IntoClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Var(Var *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Param(Param *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Aggref(Aggref *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_GroupingFunc(GroupingFunc *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_WindowFunc(WindowFunc *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SubscriptingRef(SubscriptingRef *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_FuncExpr(FuncExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_NamedArgExpr(NamedArgExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_OpExpr(OpExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ScalarArrayOpExpr(ScalarArrayOpExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_BoolExpr(BoolExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SubLink(SubLink *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SubPlan(SubPlan *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_AlternativeSubPlan(AlternativeSubPlan *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_FieldSelect(FieldSelect *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_FieldStore(FieldStore *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RelabelType(RelabelType *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CoerceViaIO(CoerceViaIO *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ArrayCoerceExpr(ArrayCoerceExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ConvertRowtypeExpr(ConvertRowtypeExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CollateExpr(CollateExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CaseExpr(CaseExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CaseWhen(CaseWhen *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CaseTestExpr(CaseTestExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ArrayExpr(ArrayExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RowExpr(RowExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RowCompareExpr(RowCompareExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CoalesceExpr(CoalesceExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_MinMaxExpr(MinMaxExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SQLValueFunction(SQLValueFunction *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_XmlExpr(XmlExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_NullTest(NullTest *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_BooleanTest(BooleanTest *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CoerceToDomain(CoerceToDomain *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CoerceToDomainValue(CoerceToDomainValue *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_SetToDefault(SetToDefault *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_CurrentOfExpr(CurrentOfExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_InferenceElem(InferenceElem *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TargetEntry(TargetEntry *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_RangeTblRef(RangeTblRef *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JoinExpr(JoinExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_FromExpr(FromExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_OnConflictExpr(OnConflictExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Integer(Integer *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Float(Float *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_Boolean(Boolean *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_String(String *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_BitString(BitString *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_A_Const(A_Const *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create(void *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser___pyx_unpickle_Displacements__set_state(struct __pyx_obj_6pglast_6parser_Displacements *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "pglast.parser"
extern int __pyx_module_is_main_pglast__parser;
int __pyx_module_is_main_pglast__parser = 0;

/* Implementation of "pglast.parser" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_chr;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_reversed;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = ".";
static const char __pyx_k_0[] = "0";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_s[] = "s";
static const char __pyx_k__3[] = "";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_Var[] = "Var";
static const char __pyx_k__32[] = "?";
static const char __pyx_k_ast[] = "ast";
static const char __pyx_k_chr[] = "chr";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_str[] = "__str__";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_kind[] = "kind";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mctx[] = "mctx";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_scan[] = "scan";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_stmt[] = "stmt";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_tree[] = "tree";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_utf8[] = "utf8";
static const char __pyx_k_Alias[] = "Alias";
static const char __pyx_k_Error[] = "Error";
static const char __pyx_k_Float[] = "Float";
static const char __pyx_k_Param[] = "Param";
static const char __pyx_k_Query[] = "Query";
static const char __pyx_k_Token[] = "Token";
static const char __pyx_k_enums[] = "enums";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_major[] = "major";
static const char __pyx_k_minor[] = "minor";
static const char __pyx_k_query[] = "query";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_stmts[] = "stmts";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_tkind[] = "tkind";
static const char __pyx_k_token[] = "token";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_A_Expr[] = "A_Expr";
static const char __pyx_k_A_Star[] = "A_Star";
static const char __pyx_k_Aggref[] = "Aggref";
static const char __pyx_k_DoStmt[] = "DoStmt";
static const char __pyx_k_OpExpr[] = "OpExpr";
static const char __pyx_k_SortBy[] = "SortBy";
static const char __pyx_k_String[] = "String";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_kwkind[] = "kwkind";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "name";
static const char __pyx_k_offset[] = "offset";
static const char __pyx_k_parsed[] = "parsed";
static const char __pyx_k_pglast[] = "pglast";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_A_Const[] = "A_Const";
static const char __pyx_k_Boolean[] = "Boolean";
static const char __pyx_k_CmdType[] = "CmdType";
static const char __pyx_k_Decimal[] = "Decimal";
static const char __pyx_k_DefElem[] = "DefElem";
static const char __pyx_k_Integer[] = "Integer";
static const char __pyx_k_RTEKind[] = "RTEKind";
static const char __pyx_k_RawStmt[] = "RawStmt";
static const char __pyx_k_RowExpr[] = "RowExpr";
static const char __pyx_k_SubLink[] = "SubLink";
static const char __pyx_k_SubPlan[] = "SubPlan";
static const char __pyx_k_UNKNOWN[] = "UNKNOWN";
static const char __pyx_k_WCOKind[] = "WCOKind";
static const char __pyx_k_XmlExpr[] = "XmlExpr";
static const char __pyx_k_cstring[] = "cstring";
static const char __pyx_k_decimal[] = "decimal";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_scanned[] = "scanned";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_AggSplit[] = "AggSplit";
static const char __pyx_k_BoolExpr[] = "BoolExpr";
static const char __pyx_k_CallStmt[] = "CallStmt";
static const char __pyx_k_CaseExpr[] = "CaseExpr";
static const char __pyx_k_CaseWhen[] = "CaseWhen";
static const char __pyx_k_CopyStmt[] = "CopyStmt";
static const char __pyx_k_DropStmt[] = "DropStmt";
static const char __pyx_k_FromExpr[] = "FromExpr";
static const char __pyx_k_FuncCall[] = "FuncCall";
static const char __pyx_k_FuncExpr[] = "FuncExpr";
static const char __pyx_k_JoinExpr[] = "JoinExpr";
static const char __pyx_k_JoinType[] = "JoinType";
static const char __pyx_k_LONG_MAX[] = "LONG_MAX";
static const char __pyx_k_LoadStmt[] = "LoadStmt";
static const char __pyx_k_LockStmt[] = "LockStmt";
static const char __pyx_k_MinMaxOp[] = "MinMaxOp";
static const char __pyx_k_NullTest[] = "NullTest";
static const char __pyx_k_ParamRef[] = "ParamRef";
static const char __pyx_k_RangeVar[] = "RangeVar";
static const char __pyx_k_RoleSpec[] = "RoleSpec";
static const char __pyx_k_RuleStmt[] = "RuleStmt";
static const char __pyx_k_TypeCast[] = "TypeCast";
static const char __pyx_k_TypeName[] = "TypeName";
static const char __pyx_k_ViewStmt[] = "ViewStmt";
static const char __pyx_k_at_index[] = ", at index ";
static const char __pyx_k_deparsed[] = "deparsed";
static const char __pyx_k_endswith[] = "endswith";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_location[] = "location";
static const char __pyx_k_protobuf[] = "protobuf";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_reversed[] = "reversed";
static const char __pyx_k_set_name[] = "__set_name__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_splitted[] = "splitted";
static const char __pyx_k_A_Indices[] = "A_Indices";
static const char __pyx_k_ArrayExpr[] = "ArrayExpr";
static const char __pyx_k_BitString[] = "BitString";
static const char __pyx_k_ColumnDef[] = "ColumnDef";
static const char __pyx_k_ColumnRef[] = "ColumnRef";
static const char __pyx_k_FetchStmt[] = "FetchStmt";
static const char __pyx_k_GrantStmt[] = "GrantStmt";
static const char __pyx_k_IndexElem[] = "IndexElem";
static const char __pyx_k_IndexStmt[] = "IndexStmt";
static const char __pyx_k_MergeStmt[] = "MergeStmt";
static const char __pyx_k_ParamKind[] = "ParamKind";
static const char __pyx_k_ResTarget[] = "ResTarget";
static const char __pyx_k_SortByDir[] = "SortByDir";
static const char __pyx_k_StatsElem[] = "StatsElem";
static const char __pyx_k_TableFunc[] = "TableFunc";
static const char __pyx_k_WindowDef[] = "WindowDef";
static const char __pyx_k_XmlExprOp[] = "XmlExprOp";
static const char __pyx_k_cursorpos[] = "cursorpos";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_parse_sql[] = "parse_sql";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_AccessPriv[] = "AccessPriv";
static const char __pyx_k_ConstrType[] = "ConstrType";
static const char __pyx_k_Constraint[] = "Constraint";
static const char __pyx_k_CreateStmt[] = "CreateStmt";
static const char __pyx_k_DefineStmt[] = "DefineStmt";
static const char __pyx_k_DeleteStmt[] = "DeleteStmt";
static const char __pyx_k_DropdbStmt[] = "DropdbStmt";
static const char __pyx_k_FieldStore[] = "FieldStore";
static const char __pyx_k_InsertStmt[] = "InsertStmt";
static const char __pyx_k_IntoClause[] = "IntoClause";
static const char __pyx_k_ListenStmt[] = "ListenStmt";
static const char __pyx_k_MinMaxExpr[] = "MinMaxExpr";
static const char __pyx_k_NotifyStmt[] = "NotifyStmt";
static const char __pyx_k_ObjectType[] = "ObjectType";
static const char __pyx_k_ParseError[] = "ParseError";
static const char __pyx_k_RenameStmt[] = "RenameStmt";
static const char __pyx_k_ReturnStmt[] = "ReturnStmt";
static const char __pyx_k_SelectStmt[] = "SelectStmt";
static const char __pyx_k_UpdateStmt[] = "UpdateStmt";
static const char __pyx_k_VacuumStmt[] = "VacuumStmt";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_WindowFunc[] = "WindowFunc";
static const char __pyx_k_WithClause[] = "WithClause";
static const char __pyx_k_cur_offset[] = "cur_offset";
static const char __pyx_k_namedtuple[] = "namedtuple";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_scan_token[] = "scan_token";
static const char __pyx_k_A_ArrayExpr[] = "A_ArrayExpr";
static const char __pyx_k_A_Expr_Kind[] = "A_Expr_Kind";
static const char __pyx_k_BooleanTest[] = "BooleanTest";
static const char __pyx_k_CallContext[] = "CallContext";
static const char __pyx_k_ClusterStmt[] = "ClusterStmt";
static const char __pyx_k_CoerceViaIO[] = "CoerceViaIO";
static const char __pyx_k_CollateExpr[] = "CollateExpr";
static const char __pyx_k_CommentStmt[] = "CommentStmt";
static const char __pyx_k_DiscardMode[] = "DiscardMode";
static const char __pyx_k_DiscardStmt[] = "DiscardStmt";
static const char __pyx_k_ExecuteStmt[] = "ExecuteStmt";
static const char __pyx_k_ExplainStmt[] = "ExplainStmt";
static const char __pyx_k_FieldSelect[] = "FieldSelect";
static const char __pyx_k_GroupingSet[] = "GroupingSet";
static const char __pyx_k_InferClause[] = "InferClause";
static const char __pyx_k_LimitOption[] = "LimitOption";
static const char __pyx_k_MergeAction[] = "MergeAction";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_PrepareStmt[] = "PrepareStmt";
static const char __pyx_k_QuerySource[] = "QuerySource";
static const char __pyx_k_RangeTblRef[] = "RangeTblRef";
static const char __pyx_k_ReindexStmt[] = "ReindexStmt";
static const char __pyx_k_RelabelType[] = "RelabelType";
static const char __pyx_k_SortByNulls[] = "SortByNulls";
static const char __pyx_k_SubLinkType[] = "SubLinkType";
static const char __pyx_k_TargetEntry[] = "TargetEntry";
static const char __pyx_k_at_position[] = ", at position ";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_fingerprint[] = "fingerprint";
static const char __pyx_k_mro_entries[] = "__mro_entries__";
static const char __pyx_k_only_slices[] = "only_slices";
static const char __pyx_k_prev_offset[] = "prev_offset";
static const char __pyx_k_scan_result[] = "scan_result";
static const char __pyx_k_with_parser[] = "with_parser";
static const char __pyx_k_AlterFdwStmt[] = "AlterFdwStmt";
static const char __pyx_k_AlterSeqStmt[] = "AlterSeqStmt";
static const char __pyx_k_BoolExprType[] = "BoolExprType";
static const char __pyx_k_BoolTestType[] = "BoolTestType";
static const char __pyx_k_CaseTestExpr[] = "CaseTestExpr";
static const char __pyx_k_CoalesceExpr[] = "CoalesceExpr";
static const char __pyx_k_CoercionForm[] = "CoercionForm";
static const char __pyx_k_CreateAmStmt[] = "CreateAmStmt";
static const char __pyx_k_CreatedbStmt[] = "CreatedbStmt";
static const char __pyx_k_DeparseError[] = "DeparseError";
static const char __pyx_k_DropBehavior[] = "DropBehavior";
static const char __pyx_k_DropRoleStmt[] = "DropRoleStmt";
static const char __pyx_k_GroupingFunc[] = "GroupingFunc";
static const char __pyx_k_NamedArgExpr[] = "NamedArgExpr";
static const char __pyx_k_NullTestType[] = "NullTestType";
static const char __pyx_k_PLAssignStmt[] = "PLAssignStmt";
static const char __pyx_k_PartitionCmd[] = "PartitionCmd";
static const char __pyx_k_RoleSpecType[] = "RoleSpecType";
static const char __pyx_k_RoleStmtType[] = "RoleStmtType";
static const char __pyx_k_SecLabelStmt[] = "SecLabelStmt";
static const char __pyx_k_SetOperation[] = "SetOperation";
static const char __pyx_k_SetToDefault[] = "SetToDefault";
static const char __pyx_k_TruncateStmt[] = "TruncateStmt";
static const char __pyx_k_UnlistenStmt[] = "UnlistenStmt";
static const char __pyx_k_WindowClause[] = "WindowClause";
static const char __pyx_k_XmlSerialize[] = "XmlSerialize";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_A_Indirection[] = "A_Indirection";
static const char __pyx_k_AlterEnumStmt[] = "AlterEnumStmt";
static const char __pyx_k_AlterRoleStmt[] = "AlterRoleStmt";
static const char __pyx_k_AlterTableCmd[] = "AlterTableCmd";
static const char __pyx_k_AlterTypeStmt[] = "AlterTypeStmt";
static const char __pyx_k_CollateClause[] = "CollateClause";
static const char __pyx_k_CreateFdwStmt[] = "CreateFdwStmt";
static const char __pyx_k_CreateSeqStmt[] = "CreateSeqStmt";
static const char __pyx_k_CurrentOfExpr[] = "CurrentOfExpr";
static const char __pyx_k_DefElemAction[] = "DefElemAction";
static const char __pyx_k_Displacements[] = "Displacements";
static const char __pyx_k_DropOwnedStmt[] = "DropOwnedStmt";
static const char __pyx_k_GrantRoleStmt[] = "GrantRoleStmt";
static const char __pyx_k_InferenceElem[] = "InferenceElem";
static const char __pyx_k_LockingClause[] = "LockingClause";
static const char __pyx_k_PartitionElem[] = "PartitionElem";
static const char __pyx_k_PartitionSpec[] = "PartitionSpec";
static const char __pyx_k_RangeFunction[] = "RangeFunction";
static const char __pyx_k_RangeTblEntry[] = "RangeTblEntry";
static const char __pyx_k_RowMarkClause[] = "RowMarkClause";
static const char __pyx_k_XmlOptionType[] = "XmlOptionType";
static const char __pyx_k_init_subclass[] = "__init_subclass__";
static const char __pyx_k_pglast_parser[] = "pglast.parser";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_AlterOwnerStmt[] = "AlterOwnerStmt";
static const char __pyx_k_AlterStatsStmt[] = "AlterStatsStmt";
static const char __pyx_k_AlterTableStmt[] = "AlterTableStmt";
static const char __pyx_k_AlterTableType[] = "AlterTableType";
static const char __pyx_k_CTECycleClause[] = "CTECycleClause";
static const char __pyx_k_CTEMaterialize[] = "CTEMaterialize";
static const char __pyx_k_CheckPointStmt[] = "CheckPointStmt";
static const char __pyx_k_CoerceToDomain[] = "CoerceToDomain";
static const char __pyx_k_CreateCastStmt[] = "CreateCastStmt";
static const char __pyx_k_CreateEnumStmt[] = "CreateEnumStmt";
static const char __pyx_k_CreateRoleStmt[] = "CreateRoleStmt";
static const char __pyx_k_CreateTrigStmt[] = "CreateTrigStmt";
static const char __pyx_k_DeallocateStmt[] = "DeallocateStmt";
static const char __pyx_k_FetchDirection[] = "FetchDirection";
static const char __pyx_k_LockWaitPolicy[] = "LockWaitPolicy";
static const char __pyx_k_MultiAssignRef[] = "MultiAssignRef";
static const char __pyx_k_ObjectWithArgs[] = "ObjectWithArgs";
static const char __pyx_k_OnCommitAction[] = "OnCommitAction";
static const char __pyx_k_OnConflictExpr[] = "OnConflictExpr";
static const char __pyx_k_OverridingKind[] = "OverridingKind";
static const char __pyx_k_RangeSubselect[] = "RangeSubselect";
static const char __pyx_k_RangeTableFunc[] = "RangeTableFunc";
static const char __pyx_k_RowCompareExpr[] = "RowCompareExpr";
static const char __pyx_k_RowCompareType[] = "RowCompareType";
static const char __pyx_k_VacuumRelation[] = "VacuumRelation";
static const char __pyx_k_parse_sql_json[] = "parse_sql_json";
static const char __pyx_k_AlterDomainStmt[] = "AlterDomainStmt";
static const char __pyx_k_AlterPolicyStmt[] = "AlterPolicyStmt";
static const char __pyx_k_AlterSystemStmt[] = "AlterSystemStmt";
static const char __pyx_k_ArrayCoerceExpr[] = "ArrayCoerceExpr";
static const char __pyx_k_CTESearchClause[] = "CTESearchClause";
static const char __pyx_k_ClosePortalStmt[] = "ClosePortalStmt";
static const char __pyx_k_CoercionContext[] = "CoercionContext";
static const char __pyx_k_CommonTableExpr[] = "CommonTableExpr";
static const char __pyx_k_CreatePLangStmt[] = "CreatePLangStmt";
static const char __pyx_k_CreateRangeStmt[] = "CreateRangeStmt";
static const char __pyx_k_CreateStatsStmt[] = "CreateStatsStmt";
static const char __pyx_k_GrantTargetType[] = "GrantTargetType";
static const char __pyx_k_GroupingSetKind[] = "GroupingSetKind";
static const char __pyx_k_InlineCodeBlock[] = "InlineCodeBlock";
static const char __pyx_k_MergeWhenClause[] = "MergeWhenClause";
static const char __pyx_k_SortGroupClause[] = "SortGroupClause";
static const char __pyx_k_SubscriptingRef[] = "SubscriptingRef";
static const char __pyx_k_TableLikeClause[] = "TableLikeClause";
static const char __pyx_k_TransactionStmt[] = "TransactionStmt";
static const char __pyx_k_Unhandled_tag_s[] = "Unhandled tag: %s";
static const char __pyx_k_VariableSetKind[] = "VariableSetKind";
static const char __pyx_k_VariableSetStmt[] = "VariableSetStmt";
static const char __pyx_k_ViewCheckOption[] = "ViewCheckOption";
static const char __pyx_k_WithCheckOption[] = "WithCheckOption";
static const char __pyx_k_offset_to_index[] = "offset_to_index";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_AlterRoleSetStmt[] = "AlterRoleSetStmt";
static const char __pyx_k_CreateDomainStmt[] = "CreateDomainStmt";
static const char __pyx_k_CreatePolicyStmt[] = "CreatePolicyStmt";
static const char __pyx_k_CreateSchemaStmt[] = "CreateSchemaStmt";
static const char __pyx_k_OnConflictAction[] = "OnConflictAction";
static const char __pyx_k_OnConflictClause[] = "OnConflictClause";
static const char __pyx_k_ParseError___str[] = "ParseError.__str__";
static const char __pyx_k_PublicationTable[] = "PublicationTable";
static const char __pyx_k_RangeTableSample[] = "RangeTableSample";
static const char __pyx_k_RangeTblFunction[] = "RangeTblFunction";
static const char __pyx_k_SQLValueFunction[] = "SQLValueFunction";
static const char __pyx_k_SetOperationStmt[] = "SetOperationStmt";
static const char __pyx_k_VariableShowStmt[] = "VariableShowStmt";
static const char __pyx_k_deparse_protobuf[] = "deparse_protobuf";
static const char __pyx_k_AlterDatabaseStmt[] = "AlterDatabaseStmt";
static const char __pyx_k_AlterFunctionStmt[] = "AlterFunctionStmt";
static const char __pyx_k_AlterOpFamilyStmt[] = "AlterOpFamilyStmt";
static const char __pyx_k_AlterOperatorStmt[] = "AlterOperatorStmt";
static const char __pyx_k_AlterTSConfigType[] = "AlterTSConfigType";
static const char __pyx_k_CompositeTypeStmt[] = "CompositeTypeStmt";
static const char __pyx_k_CreateOpClassItem[] = "CreateOpClassItem";
static const char __pyx_k_CreateOpClassStmt[] = "CreateOpClassStmt";
static const char __pyx_k_CreateTableAsStmt[] = "CreateTableAsStmt";
static const char __pyx_k_DeclareCursorStmt[] = "DeclareCursorStmt";
static const char __pyx_k_FunctionParameter[] = "FunctionParameter";
static const char __pyx_k_RangeTableFuncCol[] = "RangeTableFuncCol";
static const char __pyx_k_ReassignOwnedStmt[] = "ReassignOwnedStmt";
static const char __pyx_k_ReindexObjectType[] = "ReindexObjectType";
static const char __pyx_k_ScalarArrayOpExpr[] = "ScalarArrayOpExpr";
static const char __pyx_k_TableSampleClause[] = "TableSampleClause";
static const char __pyx_k_TriggerTransition[] = "TriggerTransition";
static const char __pyx_k_pglast_parser_pyx[] = "pglast/parser.pyx";
static const char __pyx_k_AlterCollationStmt[] = "AlterCollationStmt";
static const char __pyx_k_AlterEventTrigStmt[] = "AlterEventTrigStmt";
static const char __pyx_k_AlterExtensionStmt[] = "AlterExtensionStmt";
static const char __pyx_k_AlternativeSubPlan[] = "AlternativeSubPlan";
static const char __pyx_k_ConstraintsSetStmt[] = "ConstraintsSetStmt";
static const char __pyx_k_ConvertRowtypeExpr[] = "ConvertRowtypeExpr";
static const char __pyx_k_CreateFunctionStmt[] = "CreateFunctionStmt";
static const char __pyx_k_CreateOpFamilyStmt[] = "CreateOpFamilyStmt";
static const char __pyx_k_DeparseError___str[] = "DeparseError.__str__";
static const char __pyx_k_DropTableSpaceStmt[] = "DropTableSpaceStmt";
static const char __pyx_k_LockClauseStrength[] = "LockClauseStrength";
static const char __pyx_k_PartitionBoundSpec[] = "PartitionBoundSpec";
static const char __pyx_k_PublicationObjSpec[] = "PublicationObjSpec";
static const char __pyx_k_RefreshMatViewStmt[] = "RefreshMatViewStmt";
static const char __pyx_k_SQLValueFunctionOp[] = "SQLValueFunctionOp";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_parse_plpgsql_json[] = "parse_plpgsql_json";
static const char __pyx_k_parse_sql_protobuf[] = "parse_sql_protobuf";
static const char __pyx_k_CoerceToDomainValue[] = "CoerceToDomainValue";
static const char __pyx_k_CreateEventTrigStmt[] = "CreateEventTrigStmt";
static const char __pyx_k_CreateExtensionStmt[] = "CreateExtensionStmt";
static const char __pyx_k_CreateTransformStmt[] = "CreateTransformStmt";
static const char __pyx_k_DropUserMappingStmt[] = "DropUserMappingStmt";
static const char __pyx_k_PartitionRangeDatum[] = "PartitionRangeDatum";
static const char __pyx_k_ReplicaIdentityStmt[] = "ReplicaIdentityStmt";
static const char __pyx_k_TransactionStmtKind[] = "TransactionStmtKind";
static const char __pyx_k_AlterDatabaseSetStmt[] = "AlterDatabaseSetStmt";
static const char __pyx_k_AlterPublicationStmt[] = "AlterPublicationStmt";
static const char __pyx_k_AlterUserMappingStmt[] = "AlterUserMappingStmt";
static const char __pyx_k_CreateConversionStmt[] = "CreateConversionStmt";
static const char __pyx_k_CreateTableSpaceStmt[] = "CreateTableSpaceStmt";
static const char __pyx_k_DropSubscriptionStmt[] = "DropSubscriptionStmt";
static const char __pyx_k_AlterObjectSchemaStmt[] = "AlterObjectSchemaStmt";
static const char __pyx_k_AlterSubscriptionStmt[] = "AlterSubscriptionStmt";
static const char __pyx_k_AlterSubscriptionType[] = "AlterSubscriptionType";
static const char __pyx_k_AlterTSDictionaryStmt[] = "AlterTSDictionaryStmt";
static const char __pyx_k_AlterTableMoveAllStmt[] = "AlterTableMoveAllStmt";
static const char __pyx_k_CreatePublicationStmt[] = "CreatePublicationStmt";
static const char __pyx_k_CreateUserMappingStmt[] = "CreateUserMappingStmt";
static const char __pyx_k_FunctionParameterMode[] = "FunctionParameterMode";
static const char __pyx_k_AlterForeignServerStmt[] = "AlterForeignServerStmt";
static const char __pyx_k_AlterObjectDependsStmt[] = "AlterObjectDependsStmt";
static const char __pyx_k_AlterPublicationAction[] = "AlterPublicationAction";
static const char __pyx_k_CreateForeignTableStmt[] = "CreateForeignTableStmt";
static const char __pyx_k_CreateSubscriptionStmt[] = "CreateSubscriptionStmt";
static const char __pyx_k_PublicationObjSpecType[] = "PublicationObjSpecType";
static const char __pyx_k_get_postgresql_version[] = "get_postgresql_version";
static const char __pyx_k_CreateForeignServerStmt[] = "CreateForeignServerStmt";
static const char __pyx_k_ImportForeignSchemaStmt[] = "ImportForeignSchemaStmt";
static const char __pyx_k_ImportForeignSchemaType[] = "ImportForeignSchemaType";
static const char __pyx_k_PartitionRangeDatumKind[] = "PartitionRangeDatumKind";
static const char __pyx_k_AlterTSConfigurationStmt[] = "AlterTSConfigurationStmt";
static const char __pyx_k_AlterDefaultPrivilegesStmt[] = "AlterDefaultPrivilegesStmt";
static const char __pyx_k_AlterExtensionContentsStmt[] = "AlterExtensionContentsStmt";
static const char __pyx_k_AlterTableSpaceOptionsStmt[] = "AlterTableSpaceOptionsStmt";
static const char __pyx_k_pyx_unpickle_Displacements[] = "__pyx_unpickle_Displacements";
static const char __pyx_k_AlterDatabaseRefreshCollStmt[] = "AlterDatabaseRefreshCollStmt";
static const char __pyx_k_Displacements___reduce_cython[] = "Displacements.__reduce_cython__";
static const char __pyx_k_Displacements___setstate_cython[] = "Displacements.__setstate_cython__";
static const char __pyx_k_Exception_representing_the_error[] = "Exception representing the error state returned by the PG parser.";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))";
static const char __pyx_k_Exception_representing_the_error_2[] = "Exception representing the error state returned by the PG deparser.";
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_kp_u_;
static PyObject *__pyx_kp_u_0;
static PyObject *__pyx_n_s_A_ArrayExpr;
static PyObject *__pyx_n_s_A_Const;
static PyObject *__pyx_n_s_A_Expr;
static PyObject *__pyx_n_u_A_Expr_Kind;
static PyObject *__pyx_n_s_A_Indices;
static PyObject *__pyx_n_s_A_Indirection;
static PyObject *__pyx_n_s_A_Star;
static PyObject *__pyx_n_s_AccessPriv;
static PyObject *__pyx_n_u_AggSplit;
static PyObject *__pyx_n_s_Aggref;
static PyObject *__pyx_n_s_Alias;
static PyObject *__pyx_n_s_AlterCollationStmt;
static PyObject *__pyx_n_s_AlterDatabaseRefreshCollStmt;
static PyObject *__pyx_n_s_AlterDatabaseSetStmt;
static PyObject *__pyx_n_s_AlterDatabaseStmt;
static PyObject *__pyx_n_s_AlterDefaultPrivilegesStmt;
static PyObject *__pyx_n_s_AlterDomainStmt;
static PyObject *__pyx_n_s_AlterEnumStmt;
static PyObject *__pyx_n_s_AlterEventTrigStmt;
static PyObject *__pyx_n_s_AlterExtensionContentsStmt;
static PyObject *__pyx_n_s_AlterExtensionStmt;
static PyObject *__pyx_n_s_AlterFdwStmt;
static PyObject *__pyx_n_s_AlterForeignServerStmt;
static PyObject *__pyx_n_s_AlterFunctionStmt;
static PyObject *__pyx_n_s_AlterObjectDependsStmt;
static PyObject *__pyx_n_s_AlterObjectSchemaStmt;
static PyObject *__pyx_n_s_AlterOpFamilyStmt;
static PyObject *__pyx_n_s_AlterOperatorStmt;
static PyObject *__pyx_n_s_AlterOwnerStmt;
static PyObject *__pyx_n_s_AlterPolicyStmt;
static PyObject *__pyx_n_u_AlterPublicationAction;
static PyObject *__pyx_n_s_AlterPublicationStmt;
static PyObject *__pyx_n_s_AlterRoleSetStmt;
static PyObject *__pyx_n_s_AlterRoleStmt;
static PyObject *__pyx_n_s_AlterSeqStmt;
static PyObject *__pyx_n_s_AlterStatsStmt;
static PyObject *__pyx_n_s_AlterSubscriptionStmt;
static PyObject *__pyx_n_u_AlterSubscriptionType;
static PyObject *__pyx_n_s_AlterSystemStmt;
static PyObject *__pyx_n_u_AlterTSConfigType;
static PyObject *__pyx_n_s_AlterTSConfigurationStmt;
static PyObject *__pyx_n_s_AlterTSDictionaryStmt;
static PyObject *__pyx_n_s_AlterTableCmd;
static PyObject *__pyx_n_s_AlterTableMoveAllStmt;
static PyObject *__pyx_n_s_AlterTableSpaceOptionsStmt;
static PyObject *__pyx_n_s_AlterTableStmt;
static PyObject *__pyx_n_u_AlterTableType;
static PyObject *__pyx_n_s_AlterTypeStmt;
static PyObject *__pyx_n_s_AlterUserMappingStmt;
static PyObject *__pyx_n_s_AlternativeSubPlan;
static PyObject *__pyx_n_s_ArrayCoerceExpr;
static PyObject *__pyx_n_s_ArrayExpr;
static PyObject *__pyx_n_s_BitString;
static PyObject *__pyx_n_s_BoolExpr;
static PyObject *__pyx_n_u_BoolExprType;
static PyObject *__pyx_n_u_BoolTestType;
static PyObject *__pyx_n_s_Boolean;
static PyObject *__pyx_n_s_BooleanTest;
static PyObject *__pyx_n_s_CTECycleClause;
static PyObject *__pyx_n_u_CTEMaterialize;
static PyObject *__pyx_n_s_CTESearchClause;
static PyObject *__pyx_n_s_CallContext;
static PyObject *__pyx_n_s_CallStmt;
static PyObject *__pyx_n_s_CaseExpr;
static PyObject *__pyx_n_s_CaseTestExpr;
static PyObject *__pyx_n_s_CaseWhen;
static PyObject *__pyx_n_s_CheckPointStmt;
static PyObject *__pyx_n_s_ClosePortalStmt;
static PyObject *__pyx_n_s_ClusterStmt;
static PyObject *__pyx_n_u_CmdType;
static PyObject *__pyx_n_s_CoalesceExpr;
static PyObject *__pyx_n_s_CoerceToDomain;
static PyObject *__pyx_n_s_CoerceToDomainValue;
static PyObject *__pyx_n_s_CoerceViaIO;
static PyObject *__pyx_n_u_CoercionContext;
static PyObject *__pyx_n_u_CoercionForm;
static PyObject *__pyx_n_s_CollateClause;
static PyObject *__pyx_n_s_CollateExpr;
static PyObject *__pyx_n_s_ColumnDef;
static PyObject *__pyx_n_s_ColumnRef;
static PyObject *__pyx_n_s_CommentStmt;
static PyObject *__pyx_n_s_CommonTableExpr;
static PyObject *__pyx_n_s_CompositeTypeStmt;
static PyObject *__pyx_n_u_ConstrType;
static PyObject *__pyx_n_s_Constraint;
static PyObject *__pyx_n_s_ConstraintsSetStmt;
static PyObject *__pyx_n_s_ConvertRowtypeExpr;
static PyObject *__pyx_n_s_CopyStmt;
static PyObject *__pyx_n_s_CreateAmStmt;
static PyObject *__pyx_n_s_CreateCastStmt;
static PyObject *__pyx_n_s_CreateConversionStmt;
static PyObject *__pyx_n_s_CreateDomainStmt;
static PyObject *__pyx_n_s_CreateEnumStmt;
static PyObject *__pyx_n_s_CreateEventTrigStmt;
static PyObject *__pyx_n_s_CreateExtensionStmt;
static PyObject *__pyx_n_s_CreateFdwStmt;
static PyObject *__pyx_n_s_CreateForeignServerStmt;
static PyObject *__pyx_n_s_CreateForeignTableStmt;
static PyObject *__pyx_n_s_CreateFunctionStmt;
static PyObject *__pyx_n_s_CreateOpClassItem;
static PyObject *__pyx_n_s_CreateOpClassStmt;
static PyObject *__pyx_n_s_CreateOpFamilyStmt;
static PyObject *__pyx_n_s_CreatePLangStmt;
static PyObject *__pyx_n_s_CreatePolicyStmt;
static PyObject *__pyx_n_s_CreatePublicationStmt;
static PyObject *__pyx_n_s_CreateRangeStmt;
static PyObject *__pyx_n_s_CreateRoleStmt;
static PyObject *__pyx_n_s_CreateSchemaStmt;
static PyObject *__pyx_n_s_CreateSeqStmt;
static PyObject *__pyx_n_s_CreateStatsStmt;
static PyObject *__pyx_n_s_CreateStmt;
static PyObject *__pyx_n_s_CreateSubscriptionStmt;
static PyObject *__pyx_n_s_CreateTableAsStmt;
static PyObject *__pyx_n_s_CreateTableSpaceStmt;
static PyObject *__pyx_n_s_CreateTransformStmt;
static PyObject *__pyx_n_s_CreateTrigStmt;
static PyObject *__pyx_n_s_CreateUserMappingStmt;
static PyObject *__pyx_n_s_CreatedbStmt;
static PyObject *__pyx_n_s_CurrentOfExpr;
static PyObject *__pyx_n_s_DeallocateStmt;
static PyObject *__pyx_n_s_Decimal;
static PyObject *__pyx_n_s_DeclareCursorStmt;
static PyObject *__pyx_n_s_DefElem;
static PyObject *__pyx_n_u_DefElemAction;
static PyObject *__pyx_n_s_DefineStmt;
static PyObject *__pyx_n_s_DeleteStmt;
static PyObject *__pyx_n_s_DeparseError;
static PyObject *__pyx_n_s_DeparseError___str;
static PyObject *__pyx_n_u_DiscardMode;
static PyObject *__pyx_n_s_DiscardStmt;
static PyObject *__pyx_n_s_Displacements;
static PyObject *__pyx_n_s_Displacements___reduce_cython;
static PyObject *__pyx_n_s_Displacements___setstate_cython;
static PyObject *__pyx_n_s_DoStmt;
static PyObject *__pyx_n_u_DropBehavior;
static PyObject *__pyx_n_s_DropOwnedStmt;
static PyObject *__pyx_n_s_DropRoleStmt;
static PyObject *__pyx_n_s_DropStmt;
static PyObject *__pyx_n_s_DropSubscriptionStmt;
static PyObject *__pyx_n_s_DropTableSpaceStmt;
static PyObject *__pyx_n_s_DropUserMappingStmt;
static PyObject *__pyx_n_s_DropdbStmt;
static PyObject *__pyx_n_s_Error;
static PyObject *__pyx_kp_s_Exception_representing_the_error;
static PyObject *__pyx_kp_s_Exception_representing_the_error_2;
static PyObject *__pyx_n_s_ExecuteStmt;
static PyObject *__pyx_n_s_ExplainStmt;
static PyObject *__pyx_n_u_FetchDirection;
static PyObject *__pyx_n_s_FetchStmt;
static PyObject *__pyx_n_s_FieldSelect;
static PyObject *__pyx_n_s_FieldStore;
static PyObject *__pyx_n_s_Float;
static PyObject *__pyx_n_s_FromExpr;
static PyObject *__pyx_n_s_FuncCall;
static PyObject *__pyx_n_s_FuncExpr;
static PyObject *__pyx_n_s_FunctionParameter;
static PyObject *__pyx_n_u_FunctionParameterMode;
static PyObject *__pyx_n_s_GrantRoleStmt;
static PyObject *__pyx_n_s_GrantStmt;
static PyObject *__pyx_n_u_GrantTargetType;
static PyObject *__pyx_n_s_GroupingFunc;
static PyObject *__pyx_n_s_GroupingSet;
static PyObject *__pyx_n_u_GroupingSetKind;
static PyObject *__pyx_n_s_ImportForeignSchemaStmt;
static PyObject *__pyx_n_u_ImportForeignSchemaType;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_n_s_IndexElem;
static PyObject *__pyx_n_s_IndexStmt;
static PyObject *__pyx_n_s_InferClause;
static PyObject *__pyx_n_s_InferenceElem;
static PyObject *__pyx_n_s_InlineCodeBlock;
static PyObject *__pyx_n_s_InsertStmt;
static PyObject *__pyx_n_s_Integer;
static PyObject *__pyx_n_s_IntoClause;
static PyObject *__pyx_n_s_JoinExpr;
static PyObject *__pyx_n_u_JoinType;
static PyObject *__pyx_n_s_LONG_MAX;
static PyObject *__pyx_n_u_LimitOption;
static PyObject *__pyx_n_s_ListenStmt;
static PyObject *__pyx_n_s_LoadStmt;
static PyObject *__pyx_n_u_LockClauseStrength;
static PyObject *__pyx_n_s_LockStmt;
static PyObject *__pyx_n_u_LockWaitPolicy;
static PyObject *__pyx_n_s_LockingClause;
static PyObject *__pyx_n_s_MergeAction;
static PyObject *__pyx_n_s_MergeStmt;
static PyObject *__pyx_n_s_MergeWhenClause;
static PyObject *__pyx_n_s_MinMaxExpr;
static PyObject *__pyx_n_u_MinMaxOp;
static PyObject *__pyx_n_s_MultiAssignRef;
static PyObject *__pyx_n_s_NamedArgExpr;
static PyObject *__pyx_n_s_NotifyStmt;
static PyObject *__pyx_n_s_NullTest;
static PyObject *__pyx_n_u_NullTestType;
static PyObject *__pyx_n_u_ObjectType;
static PyObject *__pyx_n_s_ObjectWithArgs;
static PyObject *__pyx_n_u_OnCommitAction;
static PyObject *__pyx_n_u_OnConflictAction;
static PyObject *__pyx_n_s_OnConflictClause;
static PyObject *__pyx_n_s_OnConflictExpr;
static PyObject *__pyx_n_s_OpExpr;
static PyObject *__pyx_n_u_OverridingKind;
static PyObject *__pyx_n_s_PLAssignStmt;
static PyObject *__pyx_n_s_Param;
static PyObject *__pyx_n_u_ParamKind;
static PyObject *__pyx_n_s_ParamRef;
static PyObject *__pyx_n_s_ParseError;
static PyObject *__pyx_n_s_ParseError___str;
static PyObject *__pyx_n_s_PartitionBoundSpec;
static PyObject *__pyx_n_s_PartitionCmd;
static PyObject *__pyx_n_s_PartitionElem;
static PyObject *__pyx_n_s_PartitionRangeDatum;
static PyObject *__pyx_n_u_PartitionRangeDatumKind;
static PyObject *__pyx_n_s_PartitionSpec;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_PrepareStmt;
static PyObject *__pyx_n_s_PublicationObjSpec;
static PyObject *__pyx_n_u_PublicationObjSpecType;
static PyObject *__pyx_n_s_PublicationTable;
static PyObject *__pyx_n_s_Query;
static PyObject *__pyx_n_u_QuerySource;
static PyObject *__pyx_n_u_RTEKind;
static PyObject *__pyx_n_s_RangeFunction;
static PyObject *__pyx_n_s_RangeSubselect;
static PyObject *__pyx_n_s_RangeTableFunc;
static PyObject *__pyx_n_s_RangeTableFuncCol;
static PyObject *__pyx_n_s_RangeTableSample;
static PyObject *__pyx_n_s_RangeTblEntry;
static PyObject *__pyx_n_s_RangeTblFunction;
static PyObject *__pyx_n_s_RangeTblRef;
static PyObject *__pyx_n_s_RangeVar;
static PyObject *__pyx_n_s_RawStmt;
static PyObject *__pyx_n_s_ReassignOwnedStmt;
static PyObject *__pyx_n_s_RefreshMatViewStmt;
static PyObject *__pyx_n_u_ReindexObjectType;
static PyObject *__pyx_n_s_ReindexStmt;
static PyObject *__pyx_n_s_RelabelType;
static PyObject *__pyx_n_s_RenameStmt;
static PyObject *__pyx_n_s_ReplicaIdentityStmt;
static PyObject *__pyx_n_s_ResTarget;
static PyObject *__pyx_n_s_ReturnStmt;
static PyObject *__pyx_n_s_RoleSpec;
static PyObject *__pyx_n_u_RoleSpecType;
static PyObject *__pyx_n_u_RoleStmtType;
static PyObject *__pyx_n_s_RowCompareExpr;
static PyObject *__pyx_n_u_RowCompareType;
static PyObject *__pyx_n_s_RowExpr;
static PyObject *__pyx_n_s_RowMarkClause;
static PyObject *__pyx_n_s_RuleStmt;
static PyObject *__pyx_n_s_SQLValueFunction;
static PyObject *__pyx_n_u_SQLValueFunctionOp;
static PyObject *__pyx_n_s_ScalarArrayOpExpr;
static PyObject *__pyx_n_s_SecLabelStmt;
static PyObject *__pyx_n_s_SelectStmt;
static PyObject *__pyx_n_u_SetOperation;
static PyObject *__pyx_n_s_SetOperationStmt;
static PyObject *__pyx_n_s_SetToDefault;
static PyObject *__pyx_n_s_SortBy;
static PyObject *__pyx_n_u_SortByDir;
static PyObject *__pyx_n_u_SortByNulls;
static PyObject *__pyx_n_s_SortGroupClause;
static PyObject *__pyx_n_s_StatsElem;
static PyObject *__pyx_n_s_String;
static PyObject *__pyx_n_s_SubLink;
static PyObject *__pyx_n_u_SubLinkType;
static PyObject *__pyx_n_s_SubPlan;
static PyObject *__pyx_n_s_SubscriptingRef;
static PyObject *__pyx_n_s_TableFunc;
static PyObject *__pyx_n_s_TableLikeClause;
static PyObject *__pyx_n_s_TableSampleClause;
static PyObject *__pyx_n_s_TargetEntry;
static PyObject *__pyx_n_s_Token;
static PyObject *__pyx_n_u_Token;
static PyObject *__pyx_n_s_TransactionStmt;
static PyObject *__pyx_n_u_TransactionStmtKind;
static PyObject *__pyx_n_s_TriggerTransition;
static PyObject *__pyx_n_s_TruncateStmt;
static PyObject *__pyx_n_s_TypeCast;
static PyObject *__pyx_n_s_TypeName;
static PyObject *__pyx_n_u_UNKNOWN;
static PyObject *__pyx_kp_u_Unhandled_tag_s;
static PyObject *__pyx_n_s_UnlistenStmt;
static PyObject *__pyx_n_s_UpdateStmt;
static PyObject *__pyx_n_s_VacuumRelation;
static PyObject *__pyx_n_s_VacuumStmt;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Var;
static PyObject *__pyx_n_u_VariableSetKind;
static PyObject *__pyx_n_s_VariableSetStmt;
static PyObject *__pyx_n_s_VariableShowStmt;
static PyObject *__pyx_n_u_ViewCheckOption;
static PyObject *__pyx_n_s_ViewStmt;
static PyObject *__pyx_n_u_WCOKind;
static PyObject *__pyx_n_s_WindowClause;
static PyObject *__pyx_n_s_WindowDef;
static PyObject *__pyx_n_s_WindowFunc;
static PyObject *__pyx_n_s_WithCheckOption;
static PyObject *__pyx_n_s_WithClause;
static PyObject *__pyx_n_s_XmlExpr;
static PyObject *__pyx_n_u_XmlExprOp;
static PyObject *__pyx_n_u_XmlOptionType;
static PyObject *__pyx_n_s_XmlSerialize;
static PyObject *__pyx_n_s__3;
static PyObject *__pyx_n_s__32;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_ast;
static PyObject *__pyx_n_s_asyncio_coroutines;
static PyObject *__pyx_kp_u_at_index;
static PyObject *__pyx_kp_u_at_position;
static PyObject *__pyx_n_s_chr;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_cstring;
static PyObject *__pyx_n_s_cur_offset;
static PyObject *__pyx_n_s_cursorpos;
static PyObject *__pyx_n_s_decimal;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_deparse_protobuf;
static PyObject *__pyx_n_s_deparsed;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_kp_u_disable;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_kp_u_enable;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_u_end;
static PyObject *__pyx_n_s_endswith;
static PyObject *__pyx_n_s_enums;
static PyObject *__pyx_n_s_fingerprint;
static PyObject *__pyx_kp_u_gc;
static PyObject *__pyx_n_s_get_postgresql_version;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init_subclass;
static PyObject *__pyx_n_s_is_coroutine;
static PyObject *__pyx_kp_u_isenabled;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_u_kind;
static PyObject *__pyx_n_s_kwkind;
static PyObject *__pyx_n_s_location;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_major;
static PyObject *__pyx_n_s_mctx;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_minor;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_mro_entries;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_u_name_2;
static PyObject *__pyx_n_s_namedtuple;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_offset;
static PyObject *__pyx_n_s_offset_to_index;
static PyObject *__pyx_n_s_only_slices;
static PyObject *__pyx_n_s_parse_plpgsql_json;
static PyObject *__pyx_n_s_parse_sql;
static PyObject *__pyx_n_s_parse_sql_json;
static PyObject *__pyx_n_s_parse_sql_protobuf;
static PyObject *__pyx_n_s_parsed;
static PyObject *__pyx_n_s_pglast;
static PyObject *__pyx_n_s_pglast_parser;
static PyObject *__pyx_kp_s_pglast_parser_pyx;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_prev_offset;
static PyObject *__pyx_n_s_protobuf;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_Displacements;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_query;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_reversed;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_s_scan;
static PyObject *__pyx_n_s_scan_result;
static PyObject *__pyx_n_s_scan_token;
static PyObject *__pyx_n_s_scanned;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_set_name;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_splitted;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_u_start;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_stmt;
static PyObject *__pyx_n_s_stmts;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_tkind;
static PyObject *__pyx_n_s_token;
static PyObject *__pyx_n_s_tree;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_utf8;
static PyObject *__pyx_kp_u_utf_8;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_with_parser;
#endif
/* #### Code section: decls ### */
static PyObject *__pyx_pf_6pglast_6parser_10ParseError___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_12DeparseError___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_6pglast_6parser_13Displacements___init__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_13Displacements_2__call__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self, PyObject *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_13Displacements_4__reduce_cython__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_13Displacements_6__setstate_cython__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_get_postgresql_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_2parse_sql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_4parse_sql_json(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_6parse_sql_protobuf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_8parse_plpgsql_json(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_10fingerprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_12split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stmts, int __pyx_v_with_parser, int __pyx_v_only_slices); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_14deparse_protobuf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_protobuf); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_16scan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_18__pyx_unpickle_Displacements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_6pglast_6parser_Displacements(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type_index = {0, 0, 0, 0, 0};
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_10000;
static PyObject *__pyx_int_37136258;
static PyObject *__pyx_int_48433145;
static PyObject *__pyx_int_124017984;
#endif
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
#endif
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
#if CYTHON_USE_MODULE_STATE
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_6pglast_6parser_Displacements;
  PyObject *__pyx_type_6pglast_6parser_Displacements;
  PyObject *__pyx_kp_u_;
  PyObject *__pyx_kp_u_0;
  PyObject *__pyx_n_s_A_ArrayExpr;
  PyObject *__pyx_n_s_A_Const;
  PyObject *__pyx_n_s_A_Expr;
  PyObject *__pyx_n_u_A_Expr_Kind;
  PyObject *__pyx_n_s_A_Indices;
  PyObject *__pyx_n_s_A_Indirection;
  PyObject *__pyx_n_s_A_Star;
  PyObject *__pyx_n_s_AccessPriv;
  PyObject *__pyx_n_u_AggSplit;
  PyObject *__pyx_n_s_Aggref;
  PyObject *__pyx_n_s_Alias;
  PyObject *__pyx_n_s_AlterCollationStmt;
  PyObject *__pyx_n_s_AlterDatabaseRefreshCollStmt;
  PyObject *__pyx_n_s_AlterDatabaseSetStmt;
  PyObject *__pyx_n_s_AlterDatabaseStmt;
  PyObject *__pyx_n_s_AlterDefaultPrivilegesStmt;
  PyObject *__pyx_n_s_AlterDomainStmt;
  PyObject *__pyx_n_s_AlterEnumStmt;
  PyObject *__pyx_n_s_AlterEventTrigStmt;
  PyObject *__pyx_n_s_AlterExtensionContentsStmt;
  PyObject *__pyx_n_s_AlterExtensionStmt;
  PyObject *__pyx_n_s_AlterFdwStmt;
  PyObject *__pyx_n_s_AlterForeignServerStmt;
  PyObject *__pyx_n_s_AlterFunctionStmt;
  PyObject *__pyx_n_s_AlterObjectDependsStmt;
  PyObject *__pyx_n_s_AlterObjectSchemaStmt;
  PyObject *__pyx_n_s_AlterOpFamilyStmt;
  PyObject *__pyx_n_s_AlterOperatorStmt;
  PyObject *__pyx_n_s_AlterOwnerStmt;
  PyObject *__pyx_n_s_AlterPolicyStmt;
  PyObject *__pyx_n_u_AlterPublicationAction;
  PyObject *__pyx_n_s_AlterPublicationStmt;
  PyObject *__pyx_n_s_AlterRoleSetStmt;
  PyObject *__pyx_n_s_AlterRoleStmt;
  PyObject *__pyx_n_s_AlterSeqStmt;
  PyObject *__pyx_n_s_AlterStatsStmt;
  PyObject *__pyx_n_s_AlterSubscriptionStmt;
  PyObject *__pyx_n_u_AlterSubscriptionType;
  PyObject *__pyx_n_s_AlterSystemStmt;
  PyObject *__pyx_n_u_AlterTSConfigType;
  PyObject *__pyx_n_s_AlterTSConfigurationStmt;
  PyObject *__pyx_n_s_AlterTSDictionaryStmt;
  PyObject *__pyx_n_s_AlterTableCmd;
  PyObject *__pyx_n_s_AlterTableMoveAllStmt;
  PyObject *__pyx_n_s_AlterTableSpaceOptionsStmt;
  PyObject *__pyx_n_s_AlterTableStmt;
  PyObject *__pyx_n_u_AlterTableType;
  PyObject *__pyx_n_s_AlterTypeStmt;
  PyObject *__pyx_n_s_AlterUserMappingStmt;
  PyObject *__pyx_n_s_AlternativeSubPlan;
  PyObject *__pyx_n_s_ArrayCoerceExpr;
  PyObject *__pyx_n_s_ArrayExpr;
  PyObject *__pyx_n_s_BitString;
  PyObject *__pyx_n_s_BoolExpr;
  PyObject *__pyx_n_u_BoolExprType;
  PyObject *__pyx_n_u_BoolTestType;
  PyObject *__pyx_n_s_Boolean;
  PyObject *__pyx_n_s_BooleanTest;
  PyObject *__pyx_n_s_CTECycleClause;
  PyObject *__pyx_n_u_CTEMaterialize;
  PyObject *__pyx_n_s_CTESearchClause;
  PyObject *__pyx_n_s_CallContext;
  PyObject *__pyx_n_s_CallStmt;
  PyObject *__pyx_n_s_CaseExpr;
  PyObject *__pyx_n_s_CaseTestExpr;
  PyObject *__pyx_n_s_CaseWhen;
  PyObject *__pyx_n_s_CheckPointStmt;
  PyObject *__pyx_n_s_ClosePortalStmt;
  PyObject *__pyx_n_s_ClusterStmt;
  PyObject *__pyx_n_u_CmdType;
  PyObject *__pyx_n_s_CoalesceExpr;
  PyObject *__pyx_n_s_CoerceToDomain;
  PyObject *__pyx_n_s_CoerceToDomainValue;
  PyObject *__pyx_n_s_CoerceViaIO;
  PyObject *__pyx_n_u_CoercionContext;
  PyObject *__pyx_n_u_CoercionForm;
  PyObject *__pyx_n_s_CollateClause;
  PyObject *__pyx_n_s_CollateExpr;
  PyObject *__pyx_n_s_ColumnDef;
  PyObject *__pyx_n_s_ColumnRef;
  PyObject *__pyx_n_s_CommentStmt;
  PyObject *__pyx_n_s_CommonTableExpr;
  PyObject *__pyx_n_s_CompositeTypeStmt;
  PyObject *__pyx_n_u_ConstrType;
  PyObject *__pyx_n_s_Constraint;
  PyObject *__pyx_n_s_ConstraintsSetStmt;
  PyObject *__pyx_n_s_ConvertRowtypeExpr;
  PyObject *__pyx_n_s_CopyStmt;
  PyObject *__pyx_n_s_CreateAmStmt;
  PyObject *__pyx_n_s_CreateCastStmt;
  PyObject *__pyx_n_s_CreateConversionStmt;
  PyObject *__pyx_n_s_CreateDomainStmt;
  PyObject *__pyx_n_s_CreateEnumStmt;
  PyObject *__pyx_n_s_CreateEventTrigStmt;
  PyObject *__pyx_n_s_CreateExtensionStmt;
  PyObject *__pyx_n_s_CreateFdwStmt;
  PyObject *__pyx_n_s_CreateForeignServerStmt;
  PyObject *__pyx_n_s_CreateForeignTableStmt;
  PyObject *__pyx_n_s_CreateFunctionStmt;
  PyObject *__pyx_n_s_CreateOpClassItem;
  PyObject *__pyx_n_s_CreateOpClassStmt;
  PyObject *__pyx_n_s_CreateOpFamilyStmt;
  PyObject *__pyx_n_s_CreatePLangStmt;
  PyObject *__pyx_n_s_CreatePolicyStmt;
  PyObject *__pyx_n_s_CreatePublicationStmt;
  PyObject *__pyx_n_s_CreateRangeStmt;
  PyObject *__pyx_n_s_CreateRoleStmt;
  PyObject *__pyx_n_s_CreateSchemaStmt;
  PyObject *__pyx_n_s_CreateSeqStmt;
  PyObject *__pyx_n_s_CreateStatsStmt;
  PyObject *__pyx_n_s_CreateStmt;
  PyObject *__pyx_n_s_CreateSubscriptionStmt;
  PyObject *__pyx_n_s_CreateTableAsStmt;
  PyObject *__pyx_n_s_CreateTableSpaceStmt;
  PyObject *__pyx_n_s_CreateTransformStmt;
  PyObject *__pyx_n_s_CreateTrigStmt;
  PyObject *__pyx_n_s_CreateUserMappingStmt;
  PyObject *__pyx_n_s_CreatedbStmt;
  PyObject *__pyx_n_s_CurrentOfExpr;
  PyObject *__pyx_n_s_DeallocateStmt;
  PyObject *__pyx_n_s_Decimal;
  PyObject *__pyx_n_s_DeclareCursorStmt;
  PyObject *__pyx_n_s_DefElem;
  PyObject *__pyx_n_u_DefElemAction;
  PyObject *__pyx_n_s_DefineStmt;
  PyObject *__pyx_n_s_DeleteStmt;
  PyObject *__pyx_n_s_DeparseError;
  PyObject *__pyx_n_s_DeparseError___str;
  PyObject *__pyx_n_u_DiscardMode;
  PyObject *__pyx_n_s_DiscardStmt;
  PyObject *__pyx_n_s_Displacements;
  PyObject *__pyx_n_s_Displacements___reduce_cython;
  PyObject *__pyx_n_s_Displacements___setstate_cython;
  PyObject *__pyx_n_s_DoStmt;
  PyObject *__pyx_n_u_DropBehavior;
  PyObject *__pyx_n_s_DropOwnedStmt;
  PyObject *__pyx_n_s_DropRoleStmt;
  PyObject *__pyx_n_s_DropStmt;
  PyObject *__pyx_n_s_DropSubscriptionStmt;
  PyObject *__pyx_n_s_DropTableSpaceStmt;
  PyObject *__pyx_n_s_DropUserMappingStmt;
  PyObject *__pyx_n_s_DropdbStmt;
  PyObject *__pyx_n_s_Error;
  PyObject *__pyx_kp_s_Exception_representing_the_error;
  PyObject *__pyx_kp_s_Exception_representing_the_error_2;
  PyObject *__pyx_n_s_ExecuteStmt;
  PyObject *__pyx_n_s_ExplainStmt;
  PyObject *__pyx_n_u_FetchDirection;
  PyObject *__pyx_n_s_FetchStmt;
  PyObject *__pyx_n_s_FieldSelect;
  PyObject *__pyx_n_s_FieldStore;
  PyObject *__pyx_n_s_Float;
  PyObject *__pyx_n_s_FromExpr;
  PyObject *__pyx_n_s_FuncCall;
  PyObject *__pyx_n_s_FuncExpr;
  PyObject *__pyx_n_s_FunctionParameter;
  PyObject *__pyx_n_u_FunctionParameterMode;
  PyObject *__pyx_n_s_GrantRoleStmt;
  PyObject *__pyx_n_s_GrantStmt;
  PyObject *__pyx_n_u_GrantTargetType;
  PyObject *__pyx_n_s_GroupingFunc;
  PyObject *__pyx_n_s_GroupingSet;
  PyObject *__pyx_n_u_GroupingSetKind;
  PyObject *__pyx_n_s_ImportForeignSchemaStmt;
  PyObject *__pyx_n_u_ImportForeignSchemaType;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
  PyObject *__pyx_n_s_IndexElem;
  PyObject *__pyx_n_s_IndexStmt;
  PyObject *__pyx_n_s_InferClause;
  PyObject *__pyx_n_s_InferenceElem;
  PyObject *__pyx_n_s_InlineCodeBlock;
  PyObject *__pyx_n_s_InsertStmt;
  PyObject *__pyx_n_s_Integer;
  PyObject *__pyx_n_s_IntoClause;
  PyObject *__pyx_n_s_JoinExpr;
  PyObject *__pyx_n_u_JoinType;
  PyObject *__pyx_n_s_LONG_MAX;
  PyObject *__pyx_n_u_LimitOption;
  PyObject *__pyx_n_s_ListenStmt;
  PyObject *__pyx_n_s_LoadStmt;
  PyObject *__pyx_n_u_LockClauseStrength;
  PyObject *__pyx_n_s_LockStmt;
  PyObject *__pyx_n_u_LockWaitPolicy;
  PyObject *__pyx_n_s_LockingClause;
  PyObject *__pyx_n_s_MergeAction;
  PyObject *__pyx_n_s_MergeStmt;
  PyObject *__pyx_n_s_MergeWhenClause;
  PyObject *__pyx_n_s_MinMaxExpr;
  PyObject *__pyx_n_u_MinMaxOp;
  PyObject *__pyx_n_s_MultiAssignRef;
  PyObject *__pyx_n_s_NamedArgExpr;
  PyObject *__pyx_n_s_NotifyStmt;
  PyObject *__pyx_n_s_NullTest;
  PyObject *__pyx_n_u_NullTestType;
  PyObject *__pyx_n_u_ObjectType;
  PyObject *__pyx_n_s_ObjectWithArgs;
  PyObject *__pyx_n_u_OnCommitAction;
  PyObject *__pyx_n_u_OnConflictAction;
  PyObject *__pyx_n_s_OnConflictClause;
  PyObject *__pyx_n_s_OnConflictExpr;
  PyObject *__pyx_n_s_OpExpr;
  PyObject *__pyx_n_u_OverridingKind;
  PyObject *__pyx_n_s_PLAssignStmt;
  PyObject *__pyx_n_s_Param;
  PyObject *__pyx_n_u_ParamKind;
  PyObject *__pyx_n_s_ParamRef;
  PyObject *__pyx_n_s_ParseError;
  PyObject *__pyx_n_s_ParseError___str;
  PyObject *__pyx_n_s_PartitionBoundSpec;
  PyObject *__pyx_n_s_PartitionCmd;
  PyObject *__pyx_n_s_PartitionElem;
  PyObject *__pyx_n_s_PartitionRangeDatum;
  PyObject *__pyx_n_u_PartitionRangeDatumKind;
  PyObject *__pyx_n_s_PartitionSpec;
  PyObject *__pyx_n_s_PickleError;
  PyObject *__pyx_n_s_PrepareStmt;
  PyObject *__pyx_n_s_PublicationObjSpec;
  PyObject *__pyx_n_u_PublicationObjSpecType;
  PyObject *__pyx_n_s_PublicationTable;
  PyObject *__pyx_n_s_Query;
  PyObject *__pyx_n_u_QuerySource;
  PyObject *__pyx_n_u_RTEKind;
  PyObject *__pyx_n_s_RangeFunction;
  PyObject *__pyx_n_s_RangeSubselect;
  PyObject *__pyx_n_s_RangeTableFunc;
  PyObject *__pyx_n_s_RangeTableFuncCol;
  PyObject *__pyx_n_s_RangeTableSample;
  PyObject *__pyx_n_s_RangeTblEntry;
  PyObject *__pyx_n_s_RangeTblFunction;
  PyObject *__pyx_n_s_RangeTblRef;
  PyObject *__pyx_n_s_RangeVar;
  PyObject *__pyx_n_s_RawStmt;
  PyObject *__pyx_n_s_ReassignOwnedStmt;
  PyObject *__pyx_n_s_RefreshMatViewStmt;
  PyObject *__pyx_n_u_ReindexObjectType;
  PyObject *__pyx_n_s_ReindexStmt;
  PyObject *__pyx_n_s_RelabelType;
  PyObject *__pyx_n_s_RenameStmt;
  PyObject *__pyx_n_s_ReplicaIdentityStmt;
  PyObject *__pyx_n_s_ResTarget;
  PyObject *__pyx_n_s_ReturnStmt;
  PyObject *__pyx_n_s_RoleSpec;
  PyObject *__pyx_n_u_RoleSpecType;
  PyObject *__pyx_n_u_RoleStmtType;
  PyObject *__pyx_n_s_RowCompareExpr;
  PyObject *__pyx_n_u_RowCompareType;
  PyObject *__pyx_n_s_RowExpr;
  PyObject *__pyx_n_s_RowMarkClause;
  PyObject *__pyx_n_s_RuleStmt;
  PyObject *__pyx_n_s_SQLValueFunction;
  PyObject *__pyx_n_u_SQLValueFunctionOp;
  PyObject *__pyx_n_s_ScalarArrayOpExpr;
  PyObject *__pyx_n_s_SecLabelStmt;
  PyObject *__pyx_n_s_SelectStmt;
  PyObject *__pyx_n_u_SetOperation;
  PyObject *__pyx_n_s_SetOperationStmt;
  PyObject *__pyx_n_s_SetToDefault;
  PyObject *__pyx_n_s_SortBy;
  PyObject *__pyx_n_u_SortByDir;
  PyObject *__pyx_n_u_SortByNulls;
  PyObject *__pyx_n_s_SortGroupClause;
  PyObject *__pyx_n_s_StatsElem;
  PyObject *__pyx_n_s_String;
  PyObject *__pyx_n_s_SubLink;
  PyObject *__pyx_n_u_SubLinkType;
  PyObject *__pyx_n_s_SubPlan;
  PyObject *__pyx_n_s_SubscriptingRef;
  PyObject *__pyx_n_s_TableFunc;
  PyObject *__pyx_n_s_TableLikeClause;
  PyObject *__pyx_n_s_TableSampleClause;
  PyObject *__pyx_n_s_TargetEntry;
  PyObject *__pyx_n_s_Token;
  PyObject *__pyx_n_u_Token;
  PyObject *__pyx_n_s_TransactionStmt;
  PyObject *__pyx_n_u_TransactionStmtKind;
  PyObject *__pyx_n_s_TriggerTransition;
  PyObject *__pyx_n_s_TruncateStmt;
  PyObject *__pyx_n_s_TypeCast;
  PyObject *__pyx_n_s_TypeName;
  PyObject *__pyx_n_u_UNKNOWN;
  PyObject *__pyx_kp_u_Unhandled_tag_s;
  PyObject *__pyx_n_s_UnlistenStmt;
  PyObject *__pyx_n_s_UpdateStmt;
  PyObject *__pyx_n_s_VacuumRelation;
  PyObject *__pyx_n_s_VacuumStmt;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_Var;
  PyObject *__pyx_n_u_VariableSetKind;
  PyObject *__pyx_n_s_VariableSetStmt;
  PyObject *__pyx_n_s_VariableShowStmt;
  PyObject *__pyx_n_u_ViewCheckOption;
  PyObject *__pyx_n_s_ViewStmt;
  PyObject *__pyx_n_u_WCOKind;
  PyObject *__pyx_n_s_WindowClause;
  PyObject *__pyx_n_s_WindowDef;
  PyObject *__pyx_n_s_WindowFunc;
  PyObject *__pyx_n_s_WithCheckOption;
  PyObject *__pyx_n_s_WithClause;
  PyObject *__pyx_n_s_XmlExpr;
  PyObject *__pyx_n_u_XmlExprOp;
  PyObject *__pyx_n_u_XmlOptionType;
  PyObject *__pyx_n_s_XmlSerialize;
  PyObject *__pyx_n_s__3;
  PyObject *__pyx_n_s__32;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_ast;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_kp_u_at_index;
  PyObject *__pyx_kp_u_at_position;
  PyObject *__pyx_n_s_chr;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_collections;
  PyObject *__pyx_n_s_cstring;
  PyObject *__pyx_n_s_cur_offset;
  PyObject *__pyx_n_s_cursorpos;
  PyObject *__pyx_n_s_decimal;
  PyObject *__pyx_n_s_decode;
  PyObject *__pyx_n_s_deparse_protobuf;
  PyObject *__pyx_n_s_deparsed;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_doc;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_end;
  PyObject *__pyx_n_u_end;
  PyObject *__pyx_n_s_endswith;
  PyObject *__pyx_n_s_enums;
  PyObject *__pyx_n_s_fingerprint;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_get_postgresql_version;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_s_index;
  PyObject *__pyx_n_s_init_subclass;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_item;
  PyObject *__pyx_n_u_kind;
  PyObject *__pyx_n_s_kwkind;
  PyObject *__pyx_n_s_location;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_major;
  PyObject *__pyx_n_s_mctx;
  PyObject *__pyx_n_s_message;
  PyObject *__pyx_n_s_metaclass;
  PyObject *__pyx_n_s_minor;
  PyObject *__pyx_n_s_module;
  PyObject *__pyx_n_s_mro_entries;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_u_name_2;
  PyObject *__pyx_n_s_namedtuple;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_offset;
  PyObject *__pyx_n_s_offset_to_index;
  PyObject *__pyx_n_s_only_slices;
  PyObject *__pyx_n_s_parse_plpgsql_json;
  PyObject *__pyx_n_s_parse_sql;
  PyObject *__pyx_n_s_parse_sql_json;
  PyObject *__pyx_n_s_parse_sql_protobuf;
  PyObject *__pyx_n_s_parsed;
  PyObject *__pyx_n_s_pglast;
  PyObject *__pyx_n_s_pglast_parser;
  PyObject *__pyx_kp_s_pglast_parser_pyx;
  PyObject *__pyx_n_s_pickle;
  PyObject *__pyx_n_s_prepare;
  PyObject *__pyx_n_s_prev_offset;
  PyObject *__pyx_n_s_protobuf;
  PyObject *__pyx_n_s_pyx_PickleError;
  PyObject *__pyx_n_s_pyx_checksum;
  PyObject *__pyx_n_s_pyx_result;
  PyObject *__pyx_n_s_pyx_state;
  PyObject *__pyx_n_s_pyx_type;
  PyObject *__pyx_n_s_pyx_unpickle_Displacements;
  PyObject *__pyx_n_s_qualname;
  PyObject *__pyx_n_s_query;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_reduce;
  PyObject *__pyx_n_s_reduce_cython;
  PyObject *__pyx_n_s_reduce_ex;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_n_s_reversed;
  PyObject *__pyx_n_s_s;
  PyObject *__pyx_n_s_scan;
  PyObject *__pyx_n_s_scan_result;
  PyObject *__pyx_n_s_scan_token;
  PyObject *__pyx_n_s_scanned;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_set_name;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_setstate_cython;
  PyObject *__pyx_n_s_split;
  PyObject *__pyx_n_s_splitted;
  PyObject *__pyx_n_s_start;
  PyObject *__pyx_n_u_start;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_stmt;
  PyObject *__pyx_n_s_stmts;
  PyObject *__pyx_n_s_str;
  PyObject *__pyx_kp_s_stringsource;
  PyObject *__pyx_n_s_strip;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_tkind;
  PyObject *__pyx_n_s_token;
  PyObject *__pyx_n_s_tree;
  PyObject *__pyx_n_s_type;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_use_setstate;
  PyObject *__pyx_n_s_utf8;
  PyObject *__pyx_kp_u_utf_8;
  PyObject *__pyx_n_s_version;
  PyObject *__pyx_n_s_with_parser;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_10000;
  PyObject *__pyx_int_37136258;
  PyObject *__pyx_int_48433145;
  PyObject *__pyx_int_124017984;
  PyObject *__pyx_tuple__2;
  PyObject *__pyx_tuple__4;
  PyObject *__pyx_tuple__7;
  PyObject *__pyx_tuple__9;
  PyObject *__pyx_tuple__11;
  PyObject *__pyx_tuple__13;
  PyObject *__pyx_tuple__15;
  PyObject *__pyx_tuple__17;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__24;
  PyObject *__pyx_tuple__26;
  PyObject *__pyx_tuple__27;
  PyObject *__pyx_tuple__28;
  PyObject *__pyx_tuple__30;
  PyObject *__pyx_codeobj__5;
  PyObject *__pyx_codeobj__6;
  PyObject *__pyx_codeobj__8;
  PyObject *__pyx_codeobj__10;
  PyObject *__pyx_codeobj__12;
  PyObject *__pyx_codeobj__14;
  PyObject *__pyx_codeobj__16;
  PyObject *__pyx_codeobj__18;
  PyObject *__pyx_codeobj__19;
  PyObject *__pyx_codeobj__21;
  PyObject *__pyx_codeobj__23;
  PyObject *__pyx_codeobj__25;
  PyObject *__pyx_codeobj__29;
  PyObject *__pyx_codeobj__31;
} __pyx_mstate;

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

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

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

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_6pglast_6parser_Displacements);
  Py_CLEAR(clear_module_state->__pyx_type_6pglast_6parser_Displacements);
  Py_CLEAR(clear_module_state->__pyx_kp_u_);
  Py_CLEAR(clear_module_state->__pyx_kp_u_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_A_ArrayExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_A_Const);
  Py_CLEAR(clear_module_state->__pyx_n_s_A_Expr);
  Py_CLEAR(clear_module_state->__pyx_n_u_A_Expr_Kind);
  Py_CLEAR(clear_module_state->__pyx_n_s_A_Indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_A_Indirection);
  Py_CLEAR(clear_module_state->__pyx_n_s_A_Star);
  Py_CLEAR(clear_module_state->__pyx_n_s_AccessPriv);
  Py_CLEAR(clear_module_state->__pyx_n_u_AggSplit);
  Py_CLEAR(clear_module_state->__pyx_n_s_Aggref);
  Py_CLEAR(clear_module_state->__pyx_n_s_Alias);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterCollationStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterDatabaseRefreshCollStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterDatabaseSetStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterDatabaseStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterDefaultPrivilegesStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterDomainStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterEnumStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterEventTrigStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterExtensionContentsStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterExtensionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterFdwStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterForeignServerStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterFunctionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterObjectDependsStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterObjectSchemaStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterOpFamilyStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterOperatorStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterOwnerStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterPolicyStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_AlterPublicationAction);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterPublicationStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterRoleSetStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterRoleStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterSeqStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterStatsStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterSubscriptionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_AlterSubscriptionType);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterSystemStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_AlterTSConfigType);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterTSConfigurationStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterTSDictionaryStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterTableCmd);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterTableMoveAllStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterTableSpaceOptionsStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterTableStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_AlterTableType);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterTypeStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlterUserMappingStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlternativeSubPlan);
  Py_CLEAR(clear_module_state->__pyx_n_s_ArrayCoerceExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ArrayExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_BitString);
  Py_CLEAR(clear_module_state->__pyx_n_s_BoolExpr);
  Py_CLEAR(clear_module_state->__pyx_n_u_BoolExprType);
  Py_CLEAR(clear_module_state->__pyx_n_u_BoolTestType);
  Py_CLEAR(clear_module_state->__pyx_n_s_Boolean);
  Py_CLEAR(clear_module_state->__pyx_n_s_BooleanTest);
  Py_CLEAR(clear_module_state->__pyx_n_s_CTECycleClause);
  Py_CLEAR(clear_module_state->__pyx_n_u_CTEMaterialize);
  Py_CLEAR(clear_module_state->__pyx_n_s_CTESearchClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_CallContext);
  Py_CLEAR(clear_module_state->__pyx_n_s_CallStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CaseExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_CaseTestExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_CaseWhen);
  Py_CLEAR(clear_module_state->__pyx_n_s_CheckPointStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ClosePortalStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ClusterStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_CmdType);
  Py_CLEAR(clear_module_state->__pyx_n_s_CoalesceExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_CoerceToDomain);
  Py_CLEAR(clear_module_state->__pyx_n_s_CoerceToDomainValue);
  Py_CLEAR(clear_module_state->__pyx_n_s_CoerceViaIO);
  Py_CLEAR(clear_module_state->__pyx_n_u_CoercionContext);
  Py_CLEAR(clear_module_state->__pyx_n_u_CoercionForm);
  Py_CLEAR(clear_module_state->__pyx_n_s_CollateClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_CollateExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ColumnDef);
  Py_CLEAR(clear_module_state->__pyx_n_s_ColumnRef);
  Py_CLEAR(clear_module_state->__pyx_n_s_CommentStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CommonTableExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_CompositeTypeStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_ConstrType);
  Py_CLEAR(clear_module_state->__pyx_n_s_Constraint);
  Py_CLEAR(clear_module_state->__pyx_n_s_ConstraintsSetStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ConvertRowtypeExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_CopyStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateAmStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateCastStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateConversionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateDomainStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateEnumStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateEventTrigStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateExtensionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateFdwStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateForeignServerStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateForeignTableStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateFunctionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateOpClassItem);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateOpClassStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateOpFamilyStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreatePLangStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreatePolicyStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreatePublicationStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateRangeStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateRoleStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateSchemaStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateSeqStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateStatsStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateSubscriptionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateTableAsStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateTableSpaceStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateTransformStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateTrigStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreateUserMappingStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CreatedbStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CurrentOfExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_DeallocateStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_Decimal);
  Py_CLEAR(clear_module_state->__pyx_n_s_DeclareCursorStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DefElem);
  Py_CLEAR(clear_module_state->__pyx_n_u_DefElemAction);
  Py_CLEAR(clear_module_state->__pyx_n_s_DefineStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DeleteStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DeparseError);
  Py_CLEAR(clear_module_state->__pyx_n_s_DeparseError___str);
  Py_CLEAR(clear_module_state->__pyx_n_u_DiscardMode);
  Py_CLEAR(clear_module_state->__pyx_n_s_DiscardStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_Displacements);
  Py_CLEAR(clear_module_state->__pyx_n_s_Displacements___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_Displacements___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DoStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_DropBehavior);
  Py_CLEAR(clear_module_state->__pyx_n_s_DropOwnedStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DropRoleStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DropStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DropSubscriptionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DropTableSpaceStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DropUserMappingStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DropdbStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_Error);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Exception_representing_the_error);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Exception_representing_the_error_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ExecuteStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ExplainStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_FetchDirection);
  Py_CLEAR(clear_module_state->__pyx_n_s_FetchStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_FieldSelect);
  Py_CLEAR(clear_module_state->__pyx_n_s_FieldStore);
  Py_CLEAR(clear_module_state->__pyx_n_s_Float);
  Py_CLEAR(clear_module_state->__pyx_n_s_FromExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_FuncCall);
  Py_CLEAR(clear_module_state->__pyx_n_s_FuncExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_FunctionParameter);
  Py_CLEAR(clear_module_state->__pyx_n_u_FunctionParameterMode);
  Py_CLEAR(clear_module_state->__pyx_n_s_GrantRoleStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_GrantStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_GrantTargetType);
  Py_CLEAR(clear_module_state->__pyx_n_s_GroupingFunc);
  Py_CLEAR(clear_module_state->__pyx_n_s_GroupingSet);
  Py_CLEAR(clear_module_state->__pyx_n_u_GroupingSetKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_ImportForeignSchemaStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_ImportForeignSchemaType);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_IndexElem);
  Py_CLEAR(clear_module_state->__pyx_n_s_IndexStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_InferClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_InferenceElem);
  Py_CLEAR(clear_module_state->__pyx_n_s_InlineCodeBlock);
  Py_CLEAR(clear_module_state->__pyx_n_s_InsertStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_Integer);
  Py_CLEAR(clear_module_state->__pyx_n_s_IntoClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_JoinExpr);
  Py_CLEAR(clear_module_state->__pyx_n_u_JoinType);
  Py_CLEAR(clear_module_state->__pyx_n_s_LONG_MAX);
  Py_CLEAR(clear_module_state->__pyx_n_u_LimitOption);
  Py_CLEAR(clear_module_state->__pyx_n_s_ListenStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_LoadStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_LockClauseStrength);
  Py_CLEAR(clear_module_state->__pyx_n_s_LockStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_LockWaitPolicy);
  Py_CLEAR(clear_module_state->__pyx_n_s_LockingClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_MergeAction);
  Py_CLEAR(clear_module_state->__pyx_n_s_MergeStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_MergeWhenClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_MinMaxExpr);
  Py_CLEAR(clear_module_state->__pyx_n_u_MinMaxOp);
  Py_CLEAR(clear_module_state->__pyx_n_s_MultiAssignRef);
  Py_CLEAR(clear_module_state->__pyx_n_s_NamedArgExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_NotifyStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_NullTest);
  Py_CLEAR(clear_module_state->__pyx_n_u_NullTestType);
  Py_CLEAR(clear_module_state->__pyx_n_u_ObjectType);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObjectWithArgs);
  Py_CLEAR(clear_module_state->__pyx_n_u_OnCommitAction);
  Py_CLEAR(clear_module_state->__pyx_n_u_OnConflictAction);
  Py_CLEAR(clear_module_state->__pyx_n_s_OnConflictClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_OnConflictExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_OpExpr);
  Py_CLEAR(clear_module_state->__pyx_n_u_OverridingKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_PLAssignStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_Param);
  Py_CLEAR(clear_module_state->__pyx_n_u_ParamKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_ParamRef);
  Py_CLEAR(clear_module_state->__pyx_n_s_ParseError);
  Py_CLEAR(clear_module_state->__pyx_n_s_ParseError___str);
  Py_CLEAR(clear_module_state->__pyx_n_s_PartitionBoundSpec);
  Py_CLEAR(clear_module_state->__pyx_n_s_PartitionCmd);
  Py_CLEAR(clear_module_state->__pyx_n_s_PartitionElem);
  Py_CLEAR(clear_module_state->__pyx_n_s_PartitionRangeDatum);
  Py_CLEAR(clear_module_state->__pyx_n_u_PartitionRangeDatumKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_PartitionSpec);
  Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_PrepareStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_PublicationObjSpec);
  Py_CLEAR(clear_module_state->__pyx_n_u_PublicationObjSpecType);
  Py_CLEAR(clear_module_state->__pyx_n_s_PublicationTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_Query);
  Py_CLEAR(clear_module_state->__pyx_n_u_QuerySource);
  Py_CLEAR(clear_module_state->__pyx_n_u_RTEKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeFunction);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeSubselect);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeTableFunc);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeTableFuncCol);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeTableSample);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeTblEntry);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeTblFunction);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeTblRef);
  Py_CLEAR(clear_module_state->__pyx_n_s_RangeVar);
  Py_CLEAR(clear_module_state->__pyx_n_s_RawStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ReassignOwnedStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_RefreshMatViewStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_ReindexObjectType);
  Py_CLEAR(clear_module_state->__pyx_n_s_ReindexStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_RelabelType);
  Py_CLEAR(clear_module_state->__pyx_n_s_RenameStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ReplicaIdentityStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ResTarget);
  Py_CLEAR(clear_module_state->__pyx_n_s_ReturnStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_RoleSpec);
  Py_CLEAR(clear_module_state->__pyx_n_u_RoleSpecType);
  Py_CLEAR(clear_module_state->__pyx_n_u_RoleStmtType);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowCompareExpr);
  Py_CLEAR(clear_module_state->__pyx_n_u_RowCompareType);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_RowMarkClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_RuleStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_SQLValueFunction);
  Py_CLEAR(clear_module_state->__pyx_n_u_SQLValueFunctionOp);
  Py_CLEAR(clear_module_state->__pyx_n_s_ScalarArrayOpExpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_SecLabelStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_SelectStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_SetOperation);
  Py_CLEAR(clear_module_state->__pyx_n_s_SetOperationStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_SetToDefault);
  Py_CLEAR(clear_module_state->__pyx_n_s_SortBy);
  Py_CLEAR(clear_module_state->__pyx_n_u_SortByDir);
  Py_CLEAR(clear_module_state->__pyx_n_u_SortByNulls);
  Py_CLEAR(clear_module_state->__pyx_n_s_SortGroupClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_StatsElem);
  Py_CLEAR(clear_module_state->__pyx_n_s_String);
  Py_CLEAR(clear_module_state->__pyx_n_s_SubLink);
  Py_CLEAR(clear_module_state->__pyx_n_u_SubLinkType);
  Py_CLEAR(clear_module_state->__pyx_n_s_SubPlan);
  Py_CLEAR(clear_module_state->__pyx_n_s_SubscriptingRef);
  Py_CLEAR(clear_module_state->__pyx_n_s_TableFunc);
  Py_CLEAR(clear_module_state->__pyx_n_s_TableLikeClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_TableSampleClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_TargetEntry);
  Py_CLEAR(clear_module_state->__pyx_n_s_Token);
  Py_CLEAR(clear_module_state->__pyx_n_u_Token);
  Py_CLEAR(clear_module_state->__pyx_n_s_TransactionStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_TransactionStmtKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_TriggerTransition);
  Py_CLEAR(clear_module_state->__pyx_n_s_TruncateStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeCast);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeName);
  Py_CLEAR(clear_module_state->__pyx_n_u_UNKNOWN);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Unhandled_tag_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_UnlistenStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_UpdateStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_VacuumRelation);
  Py_CLEAR(clear_module_state->__pyx_n_s_VacuumStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Var);
  Py_CLEAR(clear_module_state->__pyx_n_u_VariableSetKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_VariableSetStmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_VariableShowStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_ViewCheckOption);
  Py_CLEAR(clear_module_state->__pyx_n_s_ViewStmt);
  Py_CLEAR(clear_module_state->__pyx_n_u_WCOKind);
  Py_CLEAR(clear_module_state->__pyx_n_s_WindowClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_WindowDef);
  Py_CLEAR(clear_module_state->__pyx_n_s_WindowFunc);
  Py_CLEAR(clear_module_state->__pyx_n_s_WithCheckOption);
  Py_CLEAR(clear_module_state->__pyx_n_s_WithClause);
  Py_CLEAR(clear_module_state->__pyx_n_s_XmlExpr);
  Py_CLEAR(clear_module_state->__pyx_n_u_XmlExprOp);
  Py_CLEAR(clear_module_state->__pyx_n_u_XmlOptionType);
  Py_CLEAR(clear_module_state->__pyx_n_s_XmlSerialize);
  Py_CLEAR(clear_module_state->__pyx_n_s__3);
  Py_CLEAR(clear_module_state->__pyx_n_s__32);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_ast);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_kp_u_at_index);
  Py_CLEAR(clear_module_state->__pyx_kp_u_at_position);
  Py_CLEAR(clear_module_state->__pyx_n_s_chr);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_collections);
  Py_CLEAR(clear_module_state->__pyx_n_s_cstring);
  Py_CLEAR(clear_module_state->__pyx_n_s_cur_offset);
  Py_CLEAR(clear_module_state->__pyx_n_s_cursorpos);
  Py_CLEAR(clear_module_state->__pyx_n_s_decimal);
  Py_CLEAR(clear_module_state->__pyx_n_s_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_deparse_protobuf);
  Py_CLEAR(clear_module_state->__pyx_n_s_deparsed);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_doc);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_end);
  Py_CLEAR(clear_module_state->__pyx_n_u_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_endswith);
  Py_CLEAR(clear_module_state->__pyx_n_s_enums);
  Py_CLEAR(clear_module_state->__pyx_n_s_fingerprint);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_postgresql_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_s_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_item);
  Py_CLEAR(clear_module_state->__pyx_n_u_kind);
  Py_CLEAR(clear_module_state->__pyx_n_s_kwkind);
  Py_CLEAR(clear_module_state->__pyx_n_s_location);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_major);
  Py_CLEAR(clear_module_state->__pyx_n_s_mctx);
  Py_CLEAR(clear_module_state->__pyx_n_s_message);
  Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_minor);
  Py_CLEAR(clear_module_state->__pyx_n_s_module);
  Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_u_name_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_namedtuple);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_offset);
  Py_CLEAR(clear_module_state->__pyx_n_s_offset_to_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_only_slices);
  Py_CLEAR(clear_module_state->__pyx_n_s_parse_plpgsql_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_parse_sql);
  Py_CLEAR(clear_module_state->__pyx_n_s_parse_sql_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_parse_sql_protobuf);
  Py_CLEAR(clear_module_state->__pyx_n_s_parsed);
  Py_CLEAR(clear_module_state->__pyx_n_s_pglast);
  Py_CLEAR(clear_module_state->__pyx_n_s_pglast_parser);
  Py_CLEAR(clear_module_state->__pyx_kp_s_pglast_parser_pyx);
  Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
  Py_CLEAR(clear_module_state->__pyx_n_s_prev_offset);
  Py_CLEAR(clear_module_state->__pyx_n_s_protobuf);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Displacements);
  Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
  Py_CLEAR(clear_module_state->__pyx_n_s_query);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_reversed);
  Py_CLEAR(clear_module_state->__pyx_n_s_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_scan);
  Py_CLEAR(clear_module_state->__pyx_n_s_scan_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_scan_token);
  Py_CLEAR(clear_module_state->__pyx_n_s_scanned);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_split);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitted);
  Py_CLEAR(clear_module_state->__pyx_n_s_start);
  Py_CLEAR(clear_module_state->__pyx_n_u_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_stmt);
  Py_CLEAR(clear_module_state->__pyx_n_s_stmts);
  Py_CLEAR(clear_module_state->__pyx_n_s_str);
  Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
  Py_CLEAR(clear_module_state->__pyx_n_s_strip);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_tkind);
  Py_CLEAR(clear_module_state->__pyx_n_s_token);
  Py_CLEAR(clear_module_state->__pyx_n_s_tree);
  Py_CLEAR(clear_module_state->__pyx_n_s_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_utf8);
  Py_CLEAR(clear_module_state->__pyx_kp_u_utf_8);
  Py_CLEAR(clear_module_state->__pyx_n_s_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_with_parser);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_10000);
  Py_CLEAR(clear_module_state->__pyx_int_37136258);
  Py_CLEAR(clear_module_state->__pyx_int_48433145);
  Py_CLEAR(clear_module_state->__pyx_int_124017984);
  Py_CLEAR(clear_module_state->__pyx_tuple__2);
  Py_CLEAR(clear_module_state->__pyx_tuple__4);
  Py_CLEAR(clear_module_state->__pyx_tuple__7);
  Py_CLEAR(clear_module_state->__pyx_tuple__9);
  Py_CLEAR(clear_module_state->__pyx_tuple__11);
  Py_CLEAR(clear_module_state->__pyx_tuple__13);
  Py_CLEAR(clear_module_state->__pyx_tuple__15);
  Py_CLEAR(clear_module_state->__pyx_tuple__17);
  Py_CLEAR(clear_module_state->__pyx_tuple__20);
  Py_CLEAR(clear_module_state->__pyx_tuple__22);
  Py_CLEAR(clear_module_state->__pyx_tuple__24);
  Py_CLEAR(clear_module_state->__pyx_tuple__26);
  Py_CLEAR(clear_module_state->__pyx_tuple__27);
  Py_CLEAR(clear_module_state->__pyx_tuple__28);
  Py_CLEAR(clear_module_state->__pyx_tuple__30);
  Py_CLEAR(clear_module_state->__pyx_codeobj__5);
  Py_CLEAR(clear_module_state->__pyx_codeobj__6);
  Py_CLEAR(clear_module_state->__pyx_codeobj__8);
  Py_CLEAR(clear_module_state->__pyx_codeobj__10);
  Py_CLEAR(clear_module_state->__pyx_codeobj__12);
  Py_CLEAR(clear_module_state->__pyx_codeobj__14);
  Py_CLEAR(clear_module_state->__pyx_codeobj__16);
  Py_CLEAR(clear_module_state->__pyx_codeobj__18);
  Py_CLEAR(clear_module_state->__pyx_codeobj__19);
  Py_CLEAR(clear_module_state->__pyx_codeobj__21);
  Py_CLEAR(clear_module_state->__pyx_codeobj__23);
  Py_CLEAR(clear_module_state->__pyx_codeobj__25);
  Py_CLEAR(clear_module_state->__pyx_codeobj__29);
  Py_CLEAR(clear_module_state->__pyx_codeobj__31);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_6pglast_6parser_Displacements);
  Py_VISIT(traverse_module_state->__pyx_type_6pglast_6parser_Displacements);
  Py_VISIT(traverse_module_state->__pyx_kp_u_);
  Py_VISIT(traverse_module_state->__pyx_kp_u_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_A_ArrayExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_A_Const);
  Py_VISIT(traverse_module_state->__pyx_n_s_A_Expr);
  Py_VISIT(traverse_module_state->__pyx_n_u_A_Expr_Kind);
  Py_VISIT(traverse_module_state->__pyx_n_s_A_Indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_A_Indirection);
  Py_VISIT(traverse_module_state->__pyx_n_s_A_Star);
  Py_VISIT(traverse_module_state->__pyx_n_s_AccessPriv);
  Py_VISIT(traverse_module_state->__pyx_n_u_AggSplit);
  Py_VISIT(traverse_module_state->__pyx_n_s_Aggref);
  Py_VISIT(traverse_module_state->__pyx_n_s_Alias);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterCollationStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterDatabaseRefreshCollStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterDatabaseSetStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterDatabaseStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterDefaultPrivilegesStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterDomainStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterEnumStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterEventTrigStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterExtensionContentsStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterExtensionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterFdwStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterForeignServerStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterFunctionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterObjectDependsStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterObjectSchemaStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterOpFamilyStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterOperatorStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterOwnerStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterPolicyStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_AlterPublicationAction);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterPublicationStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterRoleSetStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterRoleStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterSeqStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterStatsStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterSubscriptionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_AlterSubscriptionType);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterSystemStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_AlterTSConfigType);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterTSConfigurationStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterTSDictionaryStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterTableCmd);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterTableMoveAllStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterTableSpaceOptionsStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterTableStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_AlterTableType);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterTypeStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlterUserMappingStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlternativeSubPlan);
  Py_VISIT(traverse_module_state->__pyx_n_s_ArrayCoerceExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ArrayExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_BitString);
  Py_VISIT(traverse_module_state->__pyx_n_s_BoolExpr);
  Py_VISIT(traverse_module_state->__pyx_n_u_BoolExprType);
  Py_VISIT(traverse_module_state->__pyx_n_u_BoolTestType);
  Py_VISIT(traverse_module_state->__pyx_n_s_Boolean);
  Py_VISIT(traverse_module_state->__pyx_n_s_BooleanTest);
  Py_VISIT(traverse_module_state->__pyx_n_s_CTECycleClause);
  Py_VISIT(traverse_module_state->__pyx_n_u_CTEMaterialize);
  Py_VISIT(traverse_module_state->__pyx_n_s_CTESearchClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_CallContext);
  Py_VISIT(traverse_module_state->__pyx_n_s_CallStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CaseExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_CaseTestExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_CaseWhen);
  Py_VISIT(traverse_module_state->__pyx_n_s_CheckPointStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ClosePortalStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ClusterStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_CmdType);
  Py_VISIT(traverse_module_state->__pyx_n_s_CoalesceExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_CoerceToDomain);
  Py_VISIT(traverse_module_state->__pyx_n_s_CoerceToDomainValue);
  Py_VISIT(traverse_module_state->__pyx_n_s_CoerceViaIO);
  Py_VISIT(traverse_module_state->__pyx_n_u_CoercionContext);
  Py_VISIT(traverse_module_state->__pyx_n_u_CoercionForm);
  Py_VISIT(traverse_module_state->__pyx_n_s_CollateClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_CollateExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ColumnDef);
  Py_VISIT(traverse_module_state->__pyx_n_s_ColumnRef);
  Py_VISIT(traverse_module_state->__pyx_n_s_CommentStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CommonTableExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_CompositeTypeStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_ConstrType);
  Py_VISIT(traverse_module_state->__pyx_n_s_Constraint);
  Py_VISIT(traverse_module_state->__pyx_n_s_ConstraintsSetStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ConvertRowtypeExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_CopyStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateAmStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateCastStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateConversionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateDomainStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateEnumStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateEventTrigStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateExtensionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateFdwStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateForeignServerStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateForeignTableStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateFunctionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateOpClassItem);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateOpClassStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateOpFamilyStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreatePLangStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreatePolicyStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreatePublicationStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateRangeStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateRoleStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateSchemaStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateSeqStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateStatsStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateSubscriptionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateTableAsStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateTableSpaceStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateTransformStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateTrigStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreateUserMappingStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CreatedbStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CurrentOfExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_DeallocateStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_Decimal);
  Py_VISIT(traverse_module_state->__pyx_n_s_DeclareCursorStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DefElem);
  Py_VISIT(traverse_module_state->__pyx_n_u_DefElemAction);
  Py_VISIT(traverse_module_state->__pyx_n_s_DefineStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DeleteStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DeparseError);
  Py_VISIT(traverse_module_state->__pyx_n_s_DeparseError___str);
  Py_VISIT(traverse_module_state->__pyx_n_u_DiscardMode);
  Py_VISIT(traverse_module_state->__pyx_n_s_DiscardStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_Displacements);
  Py_VISIT(traverse_module_state->__pyx_n_s_Displacements___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_Displacements___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DoStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_DropBehavior);
  Py_VISIT(traverse_module_state->__pyx_n_s_DropOwnedStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DropRoleStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DropStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DropSubscriptionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DropTableSpaceStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DropUserMappingStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DropdbStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_Error);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Exception_representing_the_error);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Exception_representing_the_error_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ExecuteStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ExplainStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_FetchDirection);
  Py_VISIT(traverse_module_state->__pyx_n_s_FetchStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_FieldSelect);
  Py_VISIT(traverse_module_state->__pyx_n_s_FieldStore);
  Py_VISIT(traverse_module_state->__pyx_n_s_Float);
  Py_VISIT(traverse_module_state->__pyx_n_s_FromExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_FuncCall);
  Py_VISIT(traverse_module_state->__pyx_n_s_FuncExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_FunctionParameter);
  Py_VISIT(traverse_module_state->__pyx_n_u_FunctionParameterMode);
  Py_VISIT(traverse_module_state->__pyx_n_s_GrantRoleStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_GrantStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_GrantTargetType);
  Py_VISIT(traverse_module_state->__pyx_n_s_GroupingFunc);
  Py_VISIT(traverse_module_state->__pyx_n_s_GroupingSet);
  Py_VISIT(traverse_module_state->__pyx_n_u_GroupingSetKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_ImportForeignSchemaStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_ImportForeignSchemaType);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_IndexElem);
  Py_VISIT(traverse_module_state->__pyx_n_s_IndexStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_InferClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_InferenceElem);
  Py_VISIT(traverse_module_state->__pyx_n_s_InlineCodeBlock);
  Py_VISIT(traverse_module_state->__pyx_n_s_InsertStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_Integer);
  Py_VISIT(traverse_module_state->__pyx_n_s_IntoClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_JoinExpr);
  Py_VISIT(traverse_module_state->__pyx_n_u_JoinType);
  Py_VISIT(traverse_module_state->__pyx_n_s_LONG_MAX);
  Py_VISIT(traverse_module_state->__pyx_n_u_LimitOption);
  Py_VISIT(traverse_module_state->__pyx_n_s_ListenStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_LoadStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_LockClauseStrength);
  Py_VISIT(traverse_module_state->__pyx_n_s_LockStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_LockWaitPolicy);
  Py_VISIT(traverse_module_state->__pyx_n_s_LockingClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_MergeAction);
  Py_VISIT(traverse_module_state->__pyx_n_s_MergeStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_MergeWhenClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_MinMaxExpr);
  Py_VISIT(traverse_module_state->__pyx_n_u_MinMaxOp);
  Py_VISIT(traverse_module_state->__pyx_n_s_MultiAssignRef);
  Py_VISIT(traverse_module_state->__pyx_n_s_NamedArgExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_NotifyStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_NullTest);
  Py_VISIT(traverse_module_state->__pyx_n_u_NullTestType);
  Py_VISIT(traverse_module_state->__pyx_n_u_ObjectType);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObjectWithArgs);
  Py_VISIT(traverse_module_state->__pyx_n_u_OnCommitAction);
  Py_VISIT(traverse_module_state->__pyx_n_u_OnConflictAction);
  Py_VISIT(traverse_module_state->__pyx_n_s_OnConflictClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_OnConflictExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_OpExpr);
  Py_VISIT(traverse_module_state->__pyx_n_u_OverridingKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_PLAssignStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_Param);
  Py_VISIT(traverse_module_state->__pyx_n_u_ParamKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_ParamRef);
  Py_VISIT(traverse_module_state->__pyx_n_s_ParseError);
  Py_VISIT(traverse_module_state->__pyx_n_s_ParseError___str);
  Py_VISIT(traverse_module_state->__pyx_n_s_PartitionBoundSpec);
  Py_VISIT(traverse_module_state->__pyx_n_s_PartitionCmd);
  Py_VISIT(traverse_module_state->__pyx_n_s_PartitionElem);
  Py_VISIT(traverse_module_state->__pyx_n_s_PartitionRangeDatum);
  Py_VISIT(traverse_module_state->__pyx_n_u_PartitionRangeDatumKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_PartitionSpec);
  Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_PrepareStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_PublicationObjSpec);
  Py_VISIT(traverse_module_state->__pyx_n_u_PublicationObjSpecType);
  Py_VISIT(traverse_module_state->__pyx_n_s_PublicationTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_Query);
  Py_VISIT(traverse_module_state->__pyx_n_u_QuerySource);
  Py_VISIT(traverse_module_state->__pyx_n_u_RTEKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeFunction);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeSubselect);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeTableFunc);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeTableFuncCol);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeTableSample);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeTblEntry);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeTblFunction);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeTblRef);
  Py_VISIT(traverse_module_state->__pyx_n_s_RangeVar);
  Py_VISIT(traverse_module_state->__pyx_n_s_RawStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ReassignOwnedStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_RefreshMatViewStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_ReindexObjectType);
  Py_VISIT(traverse_module_state->__pyx_n_s_ReindexStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_RelabelType);
  Py_VISIT(traverse_module_state->__pyx_n_s_RenameStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ReplicaIdentityStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ResTarget);
  Py_VISIT(traverse_module_state->__pyx_n_s_ReturnStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_RoleSpec);
  Py_VISIT(traverse_module_state->__pyx_n_u_RoleSpecType);
  Py_VISIT(traverse_module_state->__pyx_n_u_RoleStmtType);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowCompareExpr);
  Py_VISIT(traverse_module_state->__pyx_n_u_RowCompareType);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_RowMarkClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_RuleStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_SQLValueFunction);
  Py_VISIT(traverse_module_state->__pyx_n_u_SQLValueFunctionOp);
  Py_VISIT(traverse_module_state->__pyx_n_s_ScalarArrayOpExpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_SecLabelStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_SelectStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_SetOperation);
  Py_VISIT(traverse_module_state->__pyx_n_s_SetOperationStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_SetToDefault);
  Py_VISIT(traverse_module_state->__pyx_n_s_SortBy);
  Py_VISIT(traverse_module_state->__pyx_n_u_SortByDir);
  Py_VISIT(traverse_module_state->__pyx_n_u_SortByNulls);
  Py_VISIT(traverse_module_state->__pyx_n_s_SortGroupClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_StatsElem);
  Py_VISIT(traverse_module_state->__pyx_n_s_String);
  Py_VISIT(traverse_module_state->__pyx_n_s_SubLink);
  Py_VISIT(traverse_module_state->__pyx_n_u_SubLinkType);
  Py_VISIT(traverse_module_state->__pyx_n_s_SubPlan);
  Py_VISIT(traverse_module_state->__pyx_n_s_SubscriptingRef);
  Py_VISIT(traverse_module_state->__pyx_n_s_TableFunc);
  Py_VISIT(traverse_module_state->__pyx_n_s_TableLikeClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_TableSampleClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_TargetEntry);
  Py_VISIT(traverse_module_state->__pyx_n_s_Token);
  Py_VISIT(traverse_module_state->__pyx_n_u_Token);
  Py_VISIT(traverse_module_state->__pyx_n_s_TransactionStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_TransactionStmtKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_TriggerTransition);
  Py_VISIT(traverse_module_state->__pyx_n_s_TruncateStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeCast);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeName);
  Py_VISIT(traverse_module_state->__pyx_n_u_UNKNOWN);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Unhandled_tag_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_UnlistenStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_UpdateStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_VacuumRelation);
  Py_VISIT(traverse_module_state->__pyx_n_s_VacuumStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Var);
  Py_VISIT(traverse_module_state->__pyx_n_u_VariableSetKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_VariableSetStmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_VariableShowStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_ViewCheckOption);
  Py_VISIT(traverse_module_state->__pyx_n_s_ViewStmt);
  Py_VISIT(traverse_module_state->__pyx_n_u_WCOKind);
  Py_VISIT(traverse_module_state->__pyx_n_s_WindowClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_WindowDef);
  Py_VISIT(traverse_module_state->__pyx_n_s_WindowFunc);
  Py_VISIT(traverse_module_state->__pyx_n_s_WithCheckOption);
  Py_VISIT(traverse_module_state->__pyx_n_s_WithClause);
  Py_VISIT(traverse_module_state->__pyx_n_s_XmlExpr);
  Py_VISIT(traverse_module_state->__pyx_n_u_XmlExprOp);
  Py_VISIT(traverse_module_state->__pyx_n_u_XmlOptionType);
  Py_VISIT(traverse_module_state->__pyx_n_s_XmlSerialize);
  Py_VISIT(traverse_module_state->__pyx_n_s__3);
  Py_VISIT(traverse_module_state->__pyx_n_s__32);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_ast);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_kp_u_at_index);
  Py_VISIT(traverse_module_state->__pyx_kp_u_at_position);
  Py_VISIT(traverse_module_state->__pyx_n_s_chr);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_collections);
  Py_VISIT(traverse_module_state->__pyx_n_s_cstring);
  Py_VISIT(traverse_module_state->__pyx_n_s_cur_offset);
  Py_VISIT(traverse_module_state->__pyx_n_s_cursorpos);
  Py_VISIT(traverse_module_state->__pyx_n_s_decimal);
  Py_VISIT(traverse_module_state->__pyx_n_s_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_deparse_protobuf);
  Py_VISIT(traverse_module_state->__pyx_n_s_deparsed);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_doc);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_end);
  Py_VISIT(traverse_module_state->__pyx_n_u_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_endswith);
  Py_VISIT(traverse_module_state->__pyx_n_s_enums);
  Py_VISIT(traverse_module_state->__pyx_n_s_fingerprint);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_postgresql_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_s_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_item);
  Py_VISIT(traverse_module_state->__pyx_n_u_kind);
  Py_VISIT(traverse_module_state->__pyx_n_s_kwkind);
  Py_VISIT(traverse_module_state->__pyx_n_s_location);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_major);
  Py_VISIT(traverse_module_state->__pyx_n_s_mctx);
  Py_VISIT(traverse_module_state->__pyx_n_s_message);
  Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_minor);
  Py_VISIT(traverse_module_state->__pyx_n_s_module);
  Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_u_name_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_namedtuple);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_offset);
  Py_VISIT(traverse_module_state->__pyx_n_s_offset_to_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_only_slices);
  Py_VISIT(traverse_module_state->__pyx_n_s_parse_plpgsql_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_parse_sql);
  Py_VISIT(traverse_module_state->__pyx_n_s_parse_sql_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_parse_sql_protobuf);
  Py_VISIT(traverse_module_state->__pyx_n_s_parsed);
  Py_VISIT(traverse_module_state->__pyx_n_s_pglast);
  Py_VISIT(traverse_module_state->__pyx_n_s_pglast_parser);
  Py_VISIT(traverse_module_state->__pyx_kp_s_pglast_parser_pyx);
  Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
  Py_VISIT(traverse_module_state->__pyx_n_s_prev_offset);
  Py_VISIT(traverse_module_state->__pyx_n_s_protobuf);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Displacements);
  Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
  Py_VISIT(traverse_module_state->__pyx_n_s_query);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_reversed);
  Py_VISIT(traverse_module_state->__pyx_n_s_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_scan);
  Py_VISIT(traverse_module_state->__pyx_n_s_scan_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_scan_token);
  Py_VISIT(traverse_module_state->__pyx_n_s_scanned);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_split);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitted);
  Py_VISIT(traverse_module_state->__pyx_n_s_start);
  Py_VISIT(traverse_module_state->__pyx_n_u_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_stmt);
  Py_VISIT(traverse_module_state->__pyx_n_s_stmts);
  Py_VISIT(traverse_module_state->__pyx_n_s_str);
  Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
  Py_VISIT(traverse_module_state->__pyx_n_s_strip);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_tkind);
  Py_VISIT(traverse_module_state->__pyx_n_s_token);
  Py_VISIT(traverse_module_state->__pyx_n_s_tree);
  Py_VISIT(traverse_module_state->__pyx_n_s_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_utf8);
  Py_VISIT(traverse_module_state->__pyx_kp_u_utf_8);
  Py_VISIT(traverse_module_state->__pyx_n_s_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_with_parser);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_10000);
  Py_VISIT(traverse_module_state->__pyx_int_37136258);
  Py_VISIT(traverse_module_state->__pyx_int_48433145);
  Py_VISIT(traverse_module_state->__pyx_int_124017984);
  Py_VISIT(traverse_module_state->__pyx_tuple__2);
  Py_VISIT(traverse_module_state->__pyx_tuple__4);
  Py_VISIT(traverse_module_state->__pyx_tuple__7);
  Py_VISIT(traverse_module_state->__pyx_tuple__9);
  Py_VISIT(traverse_module_state->__pyx_tuple__11);
  Py_VISIT(traverse_module_state->__pyx_tuple__13);
  Py_VISIT(traverse_module_state->__pyx_tuple__15);
  Py_VISIT(traverse_module_state->__pyx_tuple__17);
  Py_VISIT(traverse_module_state->__pyx_tuple__20);
  Py_VISIT(traverse_module_state->__pyx_tuple__22);
  Py_VISIT(traverse_module_state->__pyx_tuple__24);
  Py_VISIT(traverse_module_state->__pyx_tuple__26);
  Py_VISIT(traverse_module_state->__pyx_tuple__27);
  Py_VISIT(traverse_module_state->__pyx_tuple__28);
  Py_VISIT(traverse_module_state->__pyx_tuple__30);
  Py_VISIT(traverse_module_state->__pyx_codeobj__5);
  Py_VISIT(traverse_module_state->__pyx_codeobj__6);
  Py_VISIT(traverse_module_state->__pyx_codeobj__8);
  Py_VISIT(traverse_module_state->__pyx_codeobj__10);
  Py_VISIT(traverse_module_state->__pyx_codeobj__12);
  Py_VISIT(traverse_module_state->__pyx_codeobj__14);
  Py_VISIT(traverse_module_state->__pyx_codeobj__16);
  Py_VISIT(traverse_module_state->__pyx_codeobj__18);
  Py_VISIT(traverse_module_state->__pyx_codeobj__19);
  Py_VISIT(traverse_module_state->__pyx_codeobj__21);
  Py_VISIT(traverse_module_state->__pyx_codeobj__23);
  Py_VISIT(traverse_module_state->__pyx_codeobj__25);
  Py_VISIT(traverse_module_state->__pyx_codeobj__29);
  Py_VISIT(traverse_module_state->__pyx_codeobj__31);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#if CYTHON_USE_MODULE_STATE
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#define __pyx_ptype_6pglast_6parser_Displacements __pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements
#define __pyx_type_6pglast_6parser_Displacements __pyx_mstate_global->__pyx_type_6pglast_6parser_Displacements
#define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
#define __pyx_kp_u_0 __pyx_mstate_global->__pyx_kp_u_0
#define __pyx_n_s_A_ArrayExpr __pyx_mstate_global->__pyx_n_s_A_ArrayExpr
#define __pyx_n_s_A_Const __pyx_mstate_global->__pyx_n_s_A_Const
#define __pyx_n_s_A_Expr __pyx_mstate_global->__pyx_n_s_A_Expr
#define __pyx_n_u_A_Expr_Kind __pyx_mstate_global->__pyx_n_u_A_Expr_Kind
#define __pyx_n_s_A_Indices __pyx_mstate_global->__pyx_n_s_A_Indices
#define __pyx_n_s_A_Indirection __pyx_mstate_global->__pyx_n_s_A_Indirection
#define __pyx_n_s_A_Star __pyx_mstate_global->__pyx_n_s_A_Star
#define __pyx_n_s_AccessPriv __pyx_mstate_global->__pyx_n_s_AccessPriv
#define __pyx_n_u_AggSplit __pyx_mstate_global->__pyx_n_u_AggSplit
#define __pyx_n_s_Aggref __pyx_mstate_global->__pyx_n_s_Aggref
#define __pyx_n_s_Alias __pyx_mstate_global->__pyx_n_s_Alias
#define __pyx_n_s_AlterCollationStmt __pyx_mstate_global->__pyx_n_s_AlterCollationStmt
#define __pyx_n_s_AlterDatabaseRefreshCollStmt __pyx_mstate_global->__pyx_n_s_AlterDatabaseRefreshCollStmt
#define __pyx_n_s_AlterDatabaseSetStmt __pyx_mstate_global->__pyx_n_s_AlterDatabaseSetStmt
#define __pyx_n_s_AlterDatabaseStmt __pyx_mstate_global->__pyx_n_s_AlterDatabaseStmt
#define __pyx_n_s_AlterDefaultPrivilegesStmt __pyx_mstate_global->__pyx_n_s_AlterDefaultPrivilegesStmt
#define __pyx_n_s_AlterDomainStmt __pyx_mstate_global->__pyx_n_s_AlterDomainStmt
#define __pyx_n_s_AlterEnumStmt __pyx_mstate_global->__pyx_n_s_AlterEnumStmt
#define __pyx_n_s_AlterEventTrigStmt __pyx_mstate_global->__pyx_n_s_AlterEventTrigStmt
#define __pyx_n_s_AlterExtensionContentsStmt __pyx_mstate_global->__pyx_n_s_AlterExtensionContentsStmt
#define __pyx_n_s_AlterExtensionStmt __pyx_mstate_global->__pyx_n_s_AlterExtensionStmt
#define __pyx_n_s_AlterFdwStmt __pyx_mstate_global->__pyx_n_s_AlterFdwStmt
#define __pyx_n_s_AlterForeignServerStmt __pyx_mstate_global->__pyx_n_s_AlterForeignServerStmt
#define __pyx_n_s_AlterFunctionStmt __pyx_mstate_global->__pyx_n_s_AlterFunctionStmt
#define __pyx_n_s_AlterObjectDependsStmt __pyx_mstate_global->__pyx_n_s_AlterObjectDependsStmt
#define __pyx_n_s_AlterObjectSchemaStmt __pyx_mstate_global->__pyx_n_s_AlterObjectSchemaStmt
#define __pyx_n_s_AlterOpFamilyStmt __pyx_mstate_global->__pyx_n_s_AlterOpFamilyStmt
#define __pyx_n_s_AlterOperatorStmt __pyx_mstate_global->__pyx_n_s_AlterOperatorStmt
#define __pyx_n_s_AlterOwnerStmt __pyx_mstate_global->__pyx_n_s_AlterOwnerStmt
#define __pyx_n_s_AlterPolicyStmt __pyx_mstate_global->__pyx_n_s_AlterPolicyStmt
#define __pyx_n_u_AlterPublicationAction __pyx_mstate_global->__pyx_n_u_AlterPublicationAction
#define __pyx_n_s_AlterPublicationStmt __pyx_mstate_global->__pyx_n_s_AlterPublicationStmt
#define __pyx_n_s_AlterRoleSetStmt __pyx_mstate_global->__pyx_n_s_AlterRoleSetStmt
#define __pyx_n_s_AlterRoleStmt __pyx_mstate_global->__pyx_n_s_AlterRoleStmt
#define __pyx_n_s_AlterSeqStmt __pyx_mstate_global->__pyx_n_s_AlterSeqStmt
#define __pyx_n_s_AlterStatsStmt __pyx_mstate_global->__pyx_n_s_AlterStatsStmt
#define __pyx_n_s_AlterSubscriptionStmt __pyx_mstate_global->__pyx_n_s_AlterSubscriptionStmt
#define __pyx_n_u_AlterSubscriptionType __pyx_mstate_global->__pyx_n_u_AlterSubscriptionType
#define __pyx_n_s_AlterSystemStmt __pyx_mstate_global->__pyx_n_s_AlterSystemStmt
#define __pyx_n_u_AlterTSConfigType __pyx_mstate_global->__pyx_n_u_AlterTSConfigType
#define __pyx_n_s_AlterTSConfigurationStmt __pyx_mstate_global->__pyx_n_s_AlterTSConfigurationStmt
#define __pyx_n_s_AlterTSDictionaryStmt __pyx_mstate_global->__pyx_n_s_AlterTSDictionaryStmt
#define __pyx_n_s_AlterTableCmd __pyx_mstate_global->__pyx_n_s_AlterTableCmd
#define __pyx_n_s_AlterTableMoveAllStmt __pyx_mstate_global->__pyx_n_s_AlterTableMoveAllStmt
#define __pyx_n_s_AlterTableSpaceOptionsStmt __pyx_mstate_global->__pyx_n_s_AlterTableSpaceOptionsStmt
#define __pyx_n_s_AlterTableStmt __pyx_mstate_global->__pyx_n_s_AlterTableStmt
#define __pyx_n_u_AlterTableType __pyx_mstate_global->__pyx_n_u_AlterTableType
#define __pyx_n_s_AlterTypeStmt __pyx_mstate_global->__pyx_n_s_AlterTypeStmt
#define __pyx_n_s_AlterUserMappingStmt __pyx_mstate_global->__pyx_n_s_AlterUserMappingStmt
#define __pyx_n_s_AlternativeSubPlan __pyx_mstate_global->__pyx_n_s_AlternativeSubPlan
#define __pyx_n_s_ArrayCoerceExpr __pyx_mstate_global->__pyx_n_s_ArrayCoerceExpr
#define __pyx_n_s_ArrayExpr __pyx_mstate_global->__pyx_n_s_ArrayExpr
#define __pyx_n_s_BitString __pyx_mstate_global->__pyx_n_s_BitString
#define __pyx_n_s_BoolExpr __pyx_mstate_global->__pyx_n_s_BoolExpr
#define __pyx_n_u_BoolExprType __pyx_mstate_global->__pyx_n_u_BoolExprType
#define __pyx_n_u_BoolTestType __pyx_mstate_global->__pyx_n_u_BoolTestType
#define __pyx_n_s_Boolean __pyx_mstate_global->__pyx_n_s_Boolean
#define __pyx_n_s_BooleanTest __pyx_mstate_global->__pyx_n_s_BooleanTest
#define __pyx_n_s_CTECycleClause __pyx_mstate_global->__pyx_n_s_CTECycleClause
#define __pyx_n_u_CTEMaterialize __pyx_mstate_global->__pyx_n_u_CTEMaterialize
#define __pyx_n_s_CTESearchClause __pyx_mstate_global->__pyx_n_s_CTESearchClause
#define __pyx_n_s_CallContext __pyx_mstate_global->__pyx_n_s_CallContext
#define __pyx_n_s_CallStmt __pyx_mstate_global->__pyx_n_s_CallStmt
#define __pyx_n_s_CaseExpr __pyx_mstate_global->__pyx_n_s_CaseExpr
#define __pyx_n_s_CaseTestExpr __pyx_mstate_global->__pyx_n_s_CaseTestExpr
#define __pyx_n_s_CaseWhen __pyx_mstate_global->__pyx_n_s_CaseWhen
#define __pyx_n_s_CheckPointStmt __pyx_mstate_global->__pyx_n_s_CheckPointStmt
#define __pyx_n_s_ClosePortalStmt __pyx_mstate_global->__pyx_n_s_ClosePortalStmt
#define __pyx_n_s_ClusterStmt __pyx_mstate_global->__pyx_n_s_ClusterStmt
#define __pyx_n_u_CmdType __pyx_mstate_global->__pyx_n_u_CmdType
#define __pyx_n_s_CoalesceExpr __pyx_mstate_global->__pyx_n_s_CoalesceExpr
#define __pyx_n_s_CoerceToDomain __pyx_mstate_global->__pyx_n_s_CoerceToDomain
#define __pyx_n_s_CoerceToDomainValue __pyx_mstate_global->__pyx_n_s_CoerceToDomainValue
#define __pyx_n_s_CoerceViaIO __pyx_mstate_global->__pyx_n_s_CoerceViaIO
#define __pyx_n_u_CoercionContext __pyx_mstate_global->__pyx_n_u_CoercionContext
#define __pyx_n_u_CoercionForm __pyx_mstate_global->__pyx_n_u_CoercionForm
#define __pyx_n_s_CollateClause __pyx_mstate_global->__pyx_n_s_CollateClause
#define __pyx_n_s_CollateExpr __pyx_mstate_global->__pyx_n_s_CollateExpr
#define __pyx_n_s_ColumnDef __pyx_mstate_global->__pyx_n_s_ColumnDef
#define __pyx_n_s_ColumnRef __pyx_mstate_global->__pyx_n_s_ColumnRef
#define __pyx_n_s_CommentStmt __pyx_mstate_global->__pyx_n_s_CommentStmt
#define __pyx_n_s_CommonTableExpr __pyx_mstate_global->__pyx_n_s_CommonTableExpr
#define __pyx_n_s_CompositeTypeStmt __pyx_mstate_global->__pyx_n_s_CompositeTypeStmt
#define __pyx_n_u_ConstrType __pyx_mstate_global->__pyx_n_u_ConstrType
#define __pyx_n_s_Constraint __pyx_mstate_global->__pyx_n_s_Constraint
#define __pyx_n_s_ConstraintsSetStmt __pyx_mstate_global->__pyx_n_s_ConstraintsSetStmt
#define __pyx_n_s_ConvertRowtypeExpr __pyx_mstate_global->__pyx_n_s_ConvertRowtypeExpr
#define __pyx_n_s_CopyStmt __pyx_mstate_global->__pyx_n_s_CopyStmt
#define __pyx_n_s_CreateAmStmt __pyx_mstate_global->__pyx_n_s_CreateAmStmt
#define __pyx_n_s_CreateCastStmt __pyx_mstate_global->__pyx_n_s_CreateCastStmt
#define __pyx_n_s_CreateConversionStmt __pyx_mstate_global->__pyx_n_s_CreateConversionStmt
#define __pyx_n_s_CreateDomainStmt __pyx_mstate_global->__pyx_n_s_CreateDomainStmt
#define __pyx_n_s_CreateEnumStmt __pyx_mstate_global->__pyx_n_s_CreateEnumStmt
#define __pyx_n_s_CreateEventTrigStmt __pyx_mstate_global->__pyx_n_s_CreateEventTrigStmt
#define __pyx_n_s_CreateExtensionStmt __pyx_mstate_global->__pyx_n_s_CreateExtensionStmt
#define __pyx_n_s_CreateFdwStmt __pyx_mstate_global->__pyx_n_s_CreateFdwStmt
#define __pyx_n_s_CreateForeignServerStmt __pyx_mstate_global->__pyx_n_s_CreateForeignServerStmt
#define __pyx_n_s_CreateForeignTableStmt __pyx_mstate_global->__pyx_n_s_CreateForeignTableStmt
#define __pyx_n_s_CreateFunctionStmt __pyx_mstate_global->__pyx_n_s_CreateFunctionStmt
#define __pyx_n_s_CreateOpClassItem __pyx_mstate_global->__pyx_n_s_CreateOpClassItem
#define __pyx_n_s_CreateOpClassStmt __pyx_mstate_global->__pyx_n_s_CreateOpClassStmt
#define __pyx_n_s_CreateOpFamilyStmt __pyx_mstate_global->__pyx_n_s_CreateOpFamilyStmt
#define __pyx_n_s_CreatePLangStmt __pyx_mstate_global->__pyx_n_s_CreatePLangStmt
#define __pyx_n_s_CreatePolicyStmt __pyx_mstate_global->__pyx_n_s_CreatePolicyStmt
#define __pyx_n_s_CreatePublicationStmt __pyx_mstate_global->__pyx_n_s_CreatePublicationStmt
#define __pyx_n_s_CreateRangeStmt __pyx_mstate_global->__pyx_n_s_CreateRangeStmt
#define __pyx_n_s_CreateRoleStmt __pyx_mstate_global->__pyx_n_s_CreateRoleStmt
#define __pyx_n_s_CreateSchemaStmt __pyx_mstate_global->__pyx_n_s_CreateSchemaStmt
#define __pyx_n_s_CreateSeqStmt __pyx_mstate_global->__pyx_n_s_CreateSeqStmt
#define __pyx_n_s_CreateStatsStmt __pyx_mstate_global->__pyx_n_s_CreateStatsStmt
#define __pyx_n_s_CreateStmt __pyx_mstate_global->__pyx_n_s_CreateStmt
#define __pyx_n_s_CreateSubscriptionStmt __pyx_mstate_global->__pyx_n_s_CreateSubscriptionStmt
#define __pyx_n_s_CreateTableAsStmt __pyx_mstate_global->__pyx_n_s_CreateTableAsStmt
#define __pyx_n_s_CreateTableSpaceStmt __pyx_mstate_global->__pyx_n_s_CreateTableSpaceStmt
#define __pyx_n_s_CreateTransformStmt __pyx_mstate_global->__pyx_n_s_CreateTransformStmt
#define __pyx_n_s_CreateTrigStmt __pyx_mstate_global->__pyx_n_s_CreateTrigStmt
#define __pyx_n_s_CreateUserMappingStmt __pyx_mstate_global->__pyx_n_s_CreateUserMappingStmt
#define __pyx_n_s_CreatedbStmt __pyx_mstate_global->__pyx_n_s_CreatedbStmt
#define __pyx_n_s_CurrentOfExpr __pyx_mstate_global->__pyx_n_s_CurrentOfExpr
#define __pyx_n_s_DeallocateStmt __pyx_mstate_global->__pyx_n_s_DeallocateStmt
#define __pyx_n_s_Decimal __pyx_mstate_global->__pyx_n_s_Decimal
#define __pyx_n_s_DeclareCursorStmt __pyx_mstate_global->__pyx_n_s_DeclareCursorStmt
#define __pyx_n_s_DefElem __pyx_mstate_global->__pyx_n_s_DefElem
#define __pyx_n_u_DefElemAction __pyx_mstate_global->__pyx_n_u_DefElemAction
#define __pyx_n_s_DefineStmt __pyx_mstate_global->__pyx_n_s_DefineStmt
#define __pyx_n_s_DeleteStmt __pyx_mstate_global->__pyx_n_s_DeleteStmt
#define __pyx_n_s_DeparseError __pyx_mstate_global->__pyx_n_s_DeparseError
#define __pyx_n_s_DeparseError___str __pyx_mstate_global->__pyx_n_s_DeparseError___str
#define __pyx_n_u_DiscardMode __pyx_mstate_global->__pyx_n_u_DiscardMode
#define __pyx_n_s_DiscardStmt __pyx_mstate_global->__pyx_n_s_DiscardStmt
#define __pyx_n_s_Displacements __pyx_mstate_global->__pyx_n_s_Displacements
#define __pyx_n_s_Displacements___reduce_cython __pyx_mstate_global->__pyx_n_s_Displacements___reduce_cython
#define __pyx_n_s_Displacements___setstate_cython __pyx_mstate_global->__pyx_n_s_Displacements___setstate_cython
#define __pyx_n_s_DoStmt __pyx_mstate_global->__pyx_n_s_DoStmt
#define __pyx_n_u_DropBehavior __pyx_mstate_global->__pyx_n_u_DropBehavior
#define __pyx_n_s_DropOwnedStmt __pyx_mstate_global->__pyx_n_s_DropOwnedStmt
#define __pyx_n_s_DropRoleStmt __pyx_mstate_global->__pyx_n_s_DropRoleStmt
#define __pyx_n_s_DropStmt __pyx_mstate_global->__pyx_n_s_DropStmt
#define __pyx_n_s_DropSubscriptionStmt __pyx_mstate_global->__pyx_n_s_DropSubscriptionStmt
#define __pyx_n_s_DropTableSpaceStmt __pyx_mstate_global->__pyx_n_s_DropTableSpaceStmt
#define __pyx_n_s_DropUserMappingStmt __pyx_mstate_global->__pyx_n_s_DropUserMappingStmt
#define __pyx_n_s_DropdbStmt __pyx_mstate_global->__pyx_n_s_DropdbStmt
#define __pyx_n_s_Error __pyx_mstate_global->__pyx_n_s_Error
#define __pyx_kp_s_Exception_representing_the_error __pyx_mstate_global->__pyx_kp_s_Exception_representing_the_error
#define __pyx_kp_s_Exception_representing_the_error_2 __pyx_mstate_global->__pyx_kp_s_Exception_representing_the_error_2
#define __pyx_n_s_ExecuteStmt __pyx_mstate_global->__pyx_n_s_ExecuteStmt
#define __pyx_n_s_ExplainStmt __pyx_mstate_global->__pyx_n_s_ExplainStmt
#define __pyx_n_u_FetchDirection __pyx_mstate_global->__pyx_n_u_FetchDirection
#define __pyx_n_s_FetchStmt __pyx_mstate_global->__pyx_n_s_FetchStmt
#define __pyx_n_s_FieldSelect __pyx_mstate_global->__pyx_n_s_FieldSelect
#define __pyx_n_s_FieldStore __pyx_mstate_global->__pyx_n_s_FieldStore
#define __pyx_n_s_Float __pyx_mstate_global->__pyx_n_s_Float
#define __pyx_n_s_FromExpr __pyx_mstate_global->__pyx_n_s_FromExpr
#define __pyx_n_s_FuncCall __pyx_mstate_global->__pyx_n_s_FuncCall
#define __pyx_n_s_FuncExpr __pyx_mstate_global->__pyx_n_s_FuncExpr
#define __pyx_n_s_FunctionParameter __pyx_mstate_global->__pyx_n_s_FunctionParameter
#define __pyx_n_u_FunctionParameterMode __pyx_mstate_global->__pyx_n_u_FunctionParameterMode
#define __pyx_n_s_GrantRoleStmt __pyx_mstate_global->__pyx_n_s_GrantRoleStmt
#define __pyx_n_s_GrantStmt __pyx_mstate_global->__pyx_n_s_GrantStmt
#define __pyx_n_u_GrantTargetType __pyx_mstate_global->__pyx_n_u_GrantTargetType
#define __pyx_n_s_GroupingFunc __pyx_mstate_global->__pyx_n_s_GroupingFunc
#define __pyx_n_s_GroupingSet __pyx_mstate_global->__pyx_n_s_GroupingSet
#define __pyx_n_u_GroupingSetKind __pyx_mstate_global->__pyx_n_u_GroupingSetKind
#define __pyx_n_s_ImportForeignSchemaStmt __pyx_mstate_global->__pyx_n_s_ImportForeignSchemaStmt
#define __pyx_n_u_ImportForeignSchemaType __pyx_mstate_global->__pyx_n_u_ImportForeignSchemaType
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
#define __pyx_n_s_IndexElem __pyx_mstate_global->__pyx_n_s_IndexElem
#define __pyx_n_s_IndexStmt __pyx_mstate_global->__pyx_n_s_IndexStmt
#define __pyx_n_s_InferClause __pyx_mstate_global->__pyx_n_s_InferClause
#define __pyx_n_s_InferenceElem __pyx_mstate_global->__pyx_n_s_InferenceElem
#define __pyx_n_s_InlineCodeBlock __pyx_mstate_global->__pyx_n_s_InlineCodeBlock
#define __pyx_n_s_InsertStmt __pyx_mstate_global->__pyx_n_s_InsertStmt
#define __pyx_n_s_Integer __pyx_mstate_global->__pyx_n_s_Integer
#define __pyx_n_s_IntoClause __pyx_mstate_global->__pyx_n_s_IntoClause
#define __pyx_n_s_JoinExpr __pyx_mstate_global->__pyx_n_s_JoinExpr
#define __pyx_n_u_JoinType __pyx_mstate_global->__pyx_n_u_JoinType
#define __pyx_n_s_LONG_MAX __pyx_mstate_global->__pyx_n_s_LONG_MAX
#define __pyx_n_u_LimitOption __pyx_mstate_global->__pyx_n_u_LimitOption
#define __pyx_n_s_ListenStmt __pyx_mstate_global->__pyx_n_s_ListenStmt
#define __pyx_n_s_LoadStmt __pyx_mstate_global->__pyx_n_s_LoadStmt
#define __pyx_n_u_LockClauseStrength __pyx_mstate_global->__pyx_n_u_LockClauseStrength
#define __pyx_n_s_LockStmt __pyx_mstate_global->__pyx_n_s_LockStmt
#define __pyx_n_u_LockWaitPolicy __pyx_mstate_global->__pyx_n_u_LockWaitPolicy
#define __pyx_n_s_LockingClause __pyx_mstate_global->__pyx_n_s_LockingClause
#define __pyx_n_s_MergeAction __pyx_mstate_global->__pyx_n_s_MergeAction
#define __pyx_n_s_MergeStmt __pyx_mstate_global->__pyx_n_s_MergeStmt
#define __pyx_n_s_MergeWhenClause __pyx_mstate_global->__pyx_n_s_MergeWhenClause
#define __pyx_n_s_MinMaxExpr __pyx_mstate_global->__pyx_n_s_MinMaxExpr
#define __pyx_n_u_MinMaxOp __pyx_mstate_global->__pyx_n_u_MinMaxOp
#define __pyx_n_s_MultiAssignRef __pyx_mstate_global->__pyx_n_s_MultiAssignRef
#define __pyx_n_s_NamedArgExpr __pyx_mstate_global->__pyx_n_s_NamedArgExpr
#define __pyx_n_s_NotifyStmt __pyx_mstate_global->__pyx_n_s_NotifyStmt
#define __pyx_n_s_NullTest __pyx_mstate_global->__pyx_n_s_NullTest
#define __pyx_n_u_NullTestType __pyx_mstate_global->__pyx_n_u_NullTestType
#define __pyx_n_u_ObjectType __pyx_mstate_global->__pyx_n_u_ObjectType
#define __pyx_n_s_ObjectWithArgs __pyx_mstate_global->__pyx_n_s_ObjectWithArgs
#define __pyx_n_u_OnCommitAction __pyx_mstate_global->__pyx_n_u_OnCommitAction
#define __pyx_n_u_OnConflictAction __pyx_mstate_global->__pyx_n_u_OnConflictAction
#define __pyx_n_s_OnConflictClause __pyx_mstate_global->__pyx_n_s_OnConflictClause
#define __pyx_n_s_OnConflictExpr __pyx_mstate_global->__pyx_n_s_OnConflictExpr
#define __pyx_n_s_OpExpr __pyx_mstate_global->__pyx_n_s_OpExpr
#define __pyx_n_u_OverridingKind __pyx_mstate_global->__pyx_n_u_OverridingKind
#define __pyx_n_s_PLAssignStmt __pyx_mstate_global->__pyx_n_s_PLAssignStmt
#define __pyx_n_s_Param __pyx_mstate_global->__pyx_n_s_Param
#define __pyx_n_u_ParamKind __pyx_mstate_global->__pyx_n_u_ParamKind
#define __pyx_n_s_ParamRef __pyx_mstate_global->__pyx_n_s_ParamRef
#define __pyx_n_s_ParseError __pyx_mstate_global->__pyx_n_s_ParseError
#define __pyx_n_s_ParseError___str __pyx_mstate_global->__pyx_n_s_ParseError___str
#define __pyx_n_s_PartitionBoundSpec __pyx_mstate_global->__pyx_n_s_PartitionBoundSpec
#define __pyx_n_s_PartitionCmd __pyx_mstate_global->__pyx_n_s_PartitionCmd
#define __pyx_n_s_PartitionElem __pyx_mstate_global->__pyx_n_s_PartitionElem
#define __pyx_n_s_PartitionRangeDatum __pyx_mstate_global->__pyx_n_s_PartitionRangeDatum
#define __pyx_n_u_PartitionRangeDatumKind __pyx_mstate_global->__pyx_n_u_PartitionRangeDatumKind
#define __pyx_n_s_PartitionSpec __pyx_mstate_global->__pyx_n_s_PartitionSpec
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
#define __pyx_n_s_PrepareStmt __pyx_mstate_global->__pyx_n_s_PrepareStmt
#define __pyx_n_s_PublicationObjSpec __pyx_mstate_global->__pyx_n_s_PublicationObjSpec
#define __pyx_n_u_PublicationObjSpecType __pyx_mstate_global->__pyx_n_u_PublicationObjSpecType
#define __pyx_n_s_PublicationTable __pyx_mstate_global->__pyx_n_s_PublicationTable
#define __pyx_n_s_Query __pyx_mstate_global->__pyx_n_s_Query
#define __pyx_n_u_QuerySource __pyx_mstate_global->__pyx_n_u_QuerySource
#define __pyx_n_u_RTEKind __pyx_mstate_global->__pyx_n_u_RTEKind
#define __pyx_n_s_RangeFunction __pyx_mstate_global->__pyx_n_s_RangeFunction
#define __pyx_n_s_RangeSubselect __pyx_mstate_global->__pyx_n_s_RangeSubselect
#define __pyx_n_s_RangeTableFunc __pyx_mstate_global->__pyx_n_s_RangeTableFunc
#define __pyx_n_s_RangeTableFuncCol __pyx_mstate_global->__pyx_n_s_RangeTableFuncCol
#define __pyx_n_s_RangeTableSample __pyx_mstate_global->__pyx_n_s_RangeTableSample
#define __pyx_n_s_RangeTblEntry __pyx_mstate_global->__pyx_n_s_RangeTblEntry
#define __pyx_n_s_RangeTblFunction __pyx_mstate_global->__pyx_n_s_RangeTblFunction
#define __pyx_n_s_RangeTblRef __pyx_mstate_global->__pyx_n_s_RangeTblRef
#define __pyx_n_s_RangeVar __pyx_mstate_global->__pyx_n_s_RangeVar
#define __pyx_n_s_RawStmt __pyx_mstate_global->__pyx_n_s_RawStmt
#define __pyx_n_s_ReassignOwnedStmt __pyx_mstate_global->__pyx_n_s_ReassignOwnedStmt
#define __pyx_n_s_RefreshMatViewStmt __pyx_mstate_global->__pyx_n_s_RefreshMatViewStmt
#define __pyx_n_u_ReindexObjectType __pyx_mstate_global->__pyx_n_u_ReindexObjectType
#define __pyx_n_s_ReindexStmt __pyx_mstate_global->__pyx_n_s_ReindexStmt
#define __pyx_n_s_RelabelType __pyx_mstate_global->__pyx_n_s_RelabelType
#define __pyx_n_s_RenameStmt __pyx_mstate_global->__pyx_n_s_RenameStmt
#define __pyx_n_s_ReplicaIdentityStmt __pyx_mstate_global->__pyx_n_s_ReplicaIdentityStmt
#define __pyx_n_s_ResTarget __pyx_mstate_global->__pyx_n_s_ResTarget
#define __pyx_n_s_ReturnStmt __pyx_mstate_global->__pyx_n_s_ReturnStmt
#define __pyx_n_s_RoleSpec __pyx_mstate_global->__pyx_n_s_RoleSpec
#define __pyx_n_u_RoleSpecType __pyx_mstate_global->__pyx_n_u_RoleSpecType
#define __pyx_n_u_RoleStmtType __pyx_mstate_global->__pyx_n_u_RoleStmtType
#define __pyx_n_s_RowCompareExpr __pyx_mstate_global->__pyx_n_s_RowCompareExpr
#define __pyx_n_u_RowCompareType __pyx_mstate_global->__pyx_n_u_RowCompareType
#define __pyx_n_s_RowExpr __pyx_mstate_global->__pyx_n_s_RowExpr
#define __pyx_n_s_RowMarkClause __pyx_mstate_global->__pyx_n_s_RowMarkClause
#define __pyx_n_s_RuleStmt __pyx_mstate_global->__pyx_n_s_RuleStmt
#define __pyx_n_s_SQLValueFunction __pyx_mstate_global->__pyx_n_s_SQLValueFunction
#define __pyx_n_u_SQLValueFunctionOp __pyx_mstate_global->__pyx_n_u_SQLValueFunctionOp
#define __pyx_n_s_ScalarArrayOpExpr __pyx_mstate_global->__pyx_n_s_ScalarArrayOpExpr
#define __pyx_n_s_SecLabelStmt __pyx_mstate_global->__pyx_n_s_SecLabelStmt
#define __pyx_n_s_SelectStmt __pyx_mstate_global->__pyx_n_s_SelectStmt
#define __pyx_n_u_SetOperation __pyx_mstate_global->__pyx_n_u_SetOperation
#define __pyx_n_s_SetOperationStmt __pyx_mstate_global->__pyx_n_s_SetOperationStmt
#define __pyx_n_s_SetToDefault __pyx_mstate_global->__pyx_n_s_SetToDefault
#define __pyx_n_s_SortBy __pyx_mstate_global->__pyx_n_s_SortBy
#define __pyx_n_u_SortByDir __pyx_mstate_global->__pyx_n_u_SortByDir
#define __pyx_n_u_SortByNulls __pyx_mstate_global->__pyx_n_u_SortByNulls
#define __pyx_n_s_SortGroupClause __pyx_mstate_global->__pyx_n_s_SortGroupClause
#define __pyx_n_s_StatsElem __pyx_mstate_global->__pyx_n_s_StatsElem
#define __pyx_n_s_String __pyx_mstate_global->__pyx_n_s_String
#define __pyx_n_s_SubLink __pyx_mstate_global->__pyx_n_s_SubLink
#define __pyx_n_u_SubLinkType __pyx_mstate_global->__pyx_n_u_SubLinkType
#define __pyx_n_s_SubPlan __pyx_mstate_global->__pyx_n_s_SubPlan
#define __pyx_n_s_SubscriptingRef __pyx_mstate_global->__pyx_n_s_SubscriptingRef
#define __pyx_n_s_TableFunc __pyx_mstate_global->__pyx_n_s_TableFunc
#define __pyx_n_s_TableLikeClause __pyx_mstate_global->__pyx_n_s_TableLikeClause
#define __pyx_n_s_TableSampleClause __pyx_mstate_global->__pyx_n_s_TableSampleClause
#define __pyx_n_s_TargetEntry __pyx_mstate_global->__pyx_n_s_TargetEntry
#define __pyx_n_s_Token __pyx_mstate_global->__pyx_n_s_Token
#define __pyx_n_u_Token __pyx_mstate_global->__pyx_n_u_Token
#define __pyx_n_s_TransactionStmt __pyx_mstate_global->__pyx_n_s_TransactionStmt
#define __pyx_n_u_TransactionStmtKind __pyx_mstate_global->__pyx_n_u_TransactionStmtKind
#define __pyx_n_s_TriggerTransition __pyx_mstate_global->__pyx_n_s_TriggerTransition
#define __pyx_n_s_TruncateStmt __pyx_mstate_global->__pyx_n_s_TruncateStmt
#define __pyx_n_s_TypeCast __pyx_mstate_global->__pyx_n_s_TypeCast
#define __pyx_n_s_TypeName __pyx_mstate_global->__pyx_n_s_TypeName
#define __pyx_n_u_UNKNOWN __pyx_mstate_global->__pyx_n_u_UNKNOWN
#define __pyx_kp_u_Unhandled_tag_s __pyx_mstate_global->__pyx_kp_u_Unhandled_tag_s
#define __pyx_n_s_UnlistenStmt __pyx_mstate_global->__pyx_n_s_UnlistenStmt
#define __pyx_n_s_UpdateStmt __pyx_mstate_global->__pyx_n_s_UpdateStmt
#define __pyx_n_s_VacuumRelation __pyx_mstate_global->__pyx_n_s_VacuumRelation
#define __pyx_n_s_VacuumStmt __pyx_mstate_global->__pyx_n_s_VacuumStmt
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_Var __pyx_mstate_global->__pyx_n_s_Var
#define __pyx_n_u_VariableSetKind __pyx_mstate_global->__pyx_n_u_VariableSetKind
#define __pyx_n_s_VariableSetStmt __pyx_mstate_global->__pyx_n_s_VariableSetStmt
#define __pyx_n_s_VariableShowStmt __pyx_mstate_global->__pyx_n_s_VariableShowStmt
#define __pyx_n_u_ViewCheckOption __pyx_mstate_global->__pyx_n_u_ViewCheckOption
#define __pyx_n_s_ViewStmt __pyx_mstate_global->__pyx_n_s_ViewStmt
#define __pyx_n_u_WCOKind __pyx_mstate_global->__pyx_n_u_WCOKind
#define __pyx_n_s_WindowClause __pyx_mstate_global->__pyx_n_s_WindowClause
#define __pyx_n_s_WindowDef __pyx_mstate_global->__pyx_n_s_WindowDef
#define __pyx_n_s_WindowFunc __pyx_mstate_global->__pyx_n_s_WindowFunc
#define __pyx_n_s_WithCheckOption __pyx_mstate_global->__pyx_n_s_WithCheckOption
#define __pyx_n_s_WithClause __pyx_mstate_global->__pyx_n_s_WithClause
#define __pyx_n_s_XmlExpr __pyx_mstate_global->__pyx_n_s_XmlExpr
#define __pyx_n_u_XmlExprOp __pyx_mstate_global->__pyx_n_u_XmlExprOp
#define __pyx_n_u_XmlOptionType __pyx_mstate_global->__pyx_n_u_XmlOptionType
#define __pyx_n_s_XmlSerialize __pyx_mstate_global->__pyx_n_s_XmlSerialize
#define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3
#define __pyx_n_s__32 __pyx_mstate_global->__pyx_n_s__32
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_ast __pyx_mstate_global->__pyx_n_s_ast
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_kp_u_at_index __pyx_mstate_global->__pyx_kp_u_at_index
#define __pyx_kp_u_at_position __pyx_mstate_global->__pyx_kp_u_at_position
#define __pyx_n_s_chr __pyx_mstate_global->__pyx_n_s_chr
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
#define __pyx_n_s_cstring __pyx_mstate_global->__pyx_n_s_cstring
#define __pyx_n_s_cur_offset __pyx_mstate_global->__pyx_n_s_cur_offset
#define __pyx_n_s_cursorpos __pyx_mstate_global->__pyx_n_s_cursorpos
#define __pyx_n_s_decimal __pyx_mstate_global->__pyx_n_s_decimal
#define __pyx_n_s_decode __pyx_mstate_global->__pyx_n_s_decode
#define __pyx_n_s_deparse_protobuf __pyx_mstate_global->__pyx_n_s_deparse_protobuf
#define __pyx_n_s_deparsed __pyx_mstate_global->__pyx_n_s_deparsed
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
#define __pyx_n_u_end __pyx_mstate_global->__pyx_n_u_end
#define __pyx_n_s_endswith __pyx_mstate_global->__pyx_n_s_endswith
#define __pyx_n_s_enums __pyx_mstate_global->__pyx_n_s_enums
#define __pyx_n_s_fingerprint __pyx_mstate_global->__pyx_n_s_fingerprint
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_get_postgresql_version __pyx_mstate_global->__pyx_n_s_get_postgresql_version
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_item __pyx_mstate_global->__pyx_n_s_item
#define __pyx_n_u_kind __pyx_mstate_global->__pyx_n_u_kind
#define __pyx_n_s_kwkind __pyx_mstate_global->__pyx_n_s_kwkind
#define __pyx_n_s_location __pyx_mstate_global->__pyx_n_s_location
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_major __pyx_mstate_global->__pyx_n_s_major
#define __pyx_n_s_mctx __pyx_mstate_global->__pyx_n_s_mctx
#define __pyx_n_s_message __pyx_mstate_global->__pyx_n_s_message
#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
#define __pyx_n_s_minor __pyx_mstate_global->__pyx_n_s_minor
#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
#define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_u_name_2 __pyx_mstate_global->__pyx_n_u_name_2
#define __pyx_n_s_namedtuple __pyx_mstate_global->__pyx_n_s_namedtuple
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_offset __pyx_mstate_global->__pyx_n_s_offset
#define __pyx_n_s_offset_to_index __pyx_mstate_global->__pyx_n_s_offset_to_index
#define __pyx_n_s_only_slices __pyx_mstate_global->__pyx_n_s_only_slices
#define __pyx_n_s_parse_plpgsql_json __pyx_mstate_global->__pyx_n_s_parse_plpgsql_json
#define __pyx_n_s_parse_sql __pyx_mstate_global->__pyx_n_s_parse_sql
#define __pyx_n_s_parse_sql_json __pyx_mstate_global->__pyx_n_s_parse_sql_json
#define __pyx_n_s_parse_sql_protobuf __pyx_mstate_global->__pyx_n_s_parse_sql_protobuf
#define __pyx_n_s_parsed __pyx_mstate_global->__pyx_n_s_parsed
#define __pyx_n_s_pglast __pyx_mstate_global->__pyx_n_s_pglast
#define __pyx_n_s_pglast_parser __pyx_mstate_global->__pyx_n_s_pglast_parser
#define __pyx_kp_s_pglast_parser_pyx __pyx_mstate_global->__pyx_kp_s_pglast_parser_pyx
#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
#define __pyx_n_s_prev_offset __pyx_mstate_global->__pyx_n_s_prev_offset
#define __pyx_n_s_protobuf __pyx_mstate_global->__pyx_n_s_protobuf
#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
#define __pyx_n_s_pyx_unpickle_Displacements __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Displacements
#define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
#define __pyx_n_s_query __pyx_mstate_global->__pyx_n_s_query
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_n_s_reversed __pyx_mstate_global->__pyx_n_s_reversed
#define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
#define __pyx_n_s_scan __pyx_mstate_global->__pyx_n_s_scan
#define __pyx_n_s_scan_result __pyx_mstate_global->__pyx_n_s_scan_result
#define __pyx_n_s_scan_token __pyx_mstate_global->__pyx_n_s_scan_token
#define __pyx_n_s_scanned __pyx_mstate_global->__pyx_n_s_scanned
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
#define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
#define __pyx_n_s_splitted __pyx_mstate_global->__pyx_n_s_splitted
#define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
#define __pyx_n_u_start __pyx_mstate_global->__pyx_n_u_start
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_stmt __pyx_mstate_global->__pyx_n_s_stmt
#define __pyx_n_s_stmts __pyx_mstate_global->__pyx_n_s_stmts
#define __pyx_n_s_str __pyx_mstate_global->__pyx_n_s_str
#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
#define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_tkind __pyx_mstate_global->__pyx_n_s_tkind
#define __pyx_n_s_token __pyx_mstate_global->__pyx_n_s_token
#define __pyx_n_s_tree __pyx_mstate_global->__pyx_n_s_tree
#define __pyx_n_s_type __pyx_mstate_global->__pyx_n_s_type
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
#define __pyx_n_s_utf8 __pyx_mstate_global->__pyx_n_s_utf8
#define __pyx_kp_u_utf_8 __pyx_mstate_global->__pyx_kp_u_utf_8
#define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version
#define __pyx_n_s_with_parser __pyx_mstate_global->__pyx_n_s_with_parser
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_10000 __pyx_mstate_global->__pyx_int_10000
#define __pyx_int_37136258 __pyx_mstate_global->__pyx_int_37136258
#define __pyx_int_48433145 __pyx_mstate_global->__pyx_int_48433145
#define __pyx_int_124017984 __pyx_mstate_global->__pyx_int_124017984
#define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2
#define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7
#define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
#define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
#define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
#define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
#define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
#define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5
#define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
#define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8
#define __pyx_codeobj__10 __pyx_mstate_global->__pyx_codeobj__10
#define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12
#define __pyx_codeobj__14 __pyx_mstate_global->__pyx_codeobj__14
#define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16
#define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18
#define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19
#define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
#define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
#define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25
#define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
#endif
/* #### Code section: module_code ### */

/* "pglast/ast.pyx":19
 * 
 * 
 * cdef _pg_bitmapset_to_set(const structs.Bitmapset* bms):             # <<<<<<<<<<<<<<
 *     cdef set result
 *     cdef int m
 */

static PyObject *__pyx_f_6pglast_6parser__pg_bitmapset_to_set(Bitmapset const *__pyx_v_bms) {
  PyObject *__pyx_v_result = 0;
  int __pyx_v_m;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pg_bitmapset_to_set", 0);

  /* "pglast/ast.pyx":22
 *     cdef set result
 *     cdef int m
 *     if bms is not NULL:             # <<<<<<<<<<<<<<
 *         result = set()
 *         m = structs.bms_next_member(bms, -1)
 */
  __pyx_t_1 = (__pyx_v_bms != NULL);
  if (__pyx_t_1) {

    /* "pglast/ast.pyx":23
 *     cdef int m
 *     if bms is not NULL:
 *         result = set()             # <<<<<<<<<<<<<<
 *         m = structs.bms_next_member(bms, -1)
 *         while m >= 0:
 */
    __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pglast/ast.pyx":24
 *     if bms is not NULL:
 *         result = set()
 *         m = structs.bms_next_member(bms, -1)             # <<<<<<<<<<<<<<
 *         while m >= 0:
 *             result.add(m)
 */
    __pyx_v_m = bms_next_member(__pyx_v_bms, -1);

    /* "pglast/ast.pyx":25
 *         result = set()
 *         m = structs.bms_next_member(bms, -1)
 *         while m >= 0:             # <<<<<<<<<<<<<<
 *             result.add(m)
 *             m = structs.bms_next_member(bms, m)
 */
    while (1) {
      __pyx_t_1 = (__pyx_v_m >= 0);
      if (!__pyx_t_1) break;

      /* "pglast/ast.pyx":26
 *         m = structs.bms_next_member(bms, -1)
 *         while m >= 0:
 *             result.add(m)             # <<<<<<<<<<<<<<
 *             m = structs.bms_next_member(bms, m)
 *     else:
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySet_Add(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 26, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pglast/ast.pyx":27
 *         while m >= 0:
 *             result.add(m)
 *             m = structs.bms_next_member(bms, m)             # <<<<<<<<<<<<<<
 *     else:
 *         result = None
 */
      __pyx_v_m = bms_next_member(__pyx_v_bms, __pyx_v_m);
    }

    /* "pglast/ast.pyx":22
 *     cdef set result
 *     cdef int m
 *     if bms is not NULL:             # <<<<<<<<<<<<<<
 *         result = set()
 *         m = structs.bms_next_member(bms, -1)
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":29
 *             m = structs.bms_next_member(bms, m)
 *     else:
 *         result = None             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_result = ((PyObject*)Py_None);
  }
  __pyx_L3:;

  /* "pglast/ast.pyx":30
 *     else:
 *         result = None
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pglast/ast.pyx":19
 * 
 * 
 * cdef _pg_bitmapset_to_set(const structs.Bitmapset* bms):             # <<<<<<<<<<<<<<
 *     cdef set result
 *     cdef int m
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pglast.parser._pg_bitmapset_to_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":33
 * 
 * 
 * cdef _pg_str_to_decimal(const char* cstr):             # <<<<<<<<<<<<<<
 *     # Add a trailing zero to truncated floats like "2.", see issues #91 and #100
 *     cdef s = cstr.decode("utf-8")
 */

static PyObject *__pyx_f_6pglast_6parser__pg_str_to_decimal(char const *__pyx_v_cstr) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pg_str_to_decimal", 0);

  /* "pglast/ast.pyx":35
 * cdef _pg_str_to_decimal(const char* cstr):
 *     # Add a trailing zero to truncated floats like "2.", see issues #91 and #100
 *     cdef s = cstr.decode("utf-8")             # <<<<<<<<<<<<<<
 *     if s.endswith('.'):
 *         s += '0'
 */
  __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_cstr, 0, strlen(__pyx_v_cstr), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":36
 *     # Add a trailing zero to truncated floats like "2.", see issues #91 and #100
 *     cdef s = cstr.decode("utf-8")
 *     if s.endswith('.'):             # <<<<<<<<<<<<<<
 *         s += '0'
 *     return ast.Float(Decimal(s))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "pglast/ast.pyx":37
 *     cdef s = cstr.decode("utf-8")
 *     if s.endswith('.'):
 *         s += '0'             # <<<<<<<<<<<<<<
 *     return ast.Float(Decimal(s))
 * 
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_kp_u_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":36
 *     # Add a trailing zero to truncated floats like "2.", see issues #91 and #100
 *     cdef s = cstr.decode("utf-8")
 *     if s.endswith('.'):             # <<<<<<<<<<<<<<
 *         s += '0'
 *     return ast.Float(Decimal(s))
 */
  }

  /* "pglast/ast.pyx":38
 *     if s.endswith('.'):
 *         s += '0'
 *     return ast.Float(Decimal(s))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Float); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_s};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __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;

  /* "pglast/ast.pyx":33
 * 
 * 
 * cdef _pg_str_to_decimal(const char* cstr):             # <<<<<<<<<<<<<<
 *     # Add a trailing zero to truncated floats like "2.", see issues #91 and #100
 *     cdef s = cstr.decode("utf-8")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser._pg_str_to_decimal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":41
 * 
 * 
 * cdef _pg_list_to_tuple(const structs.List* lst, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple result
 *     cdef int i
 */

static PyObject *__pyx_f_6pglast_6parser__pg_list_to_tuple(List const *__pyx_v_lst, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_result = 0;
  int __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_pg_list_to_tuple", 0);

  /* "pglast/ast.pyx":44
 *     cdef tuple result
 *     cdef int i
 *     if lst is not NULL:             # <<<<<<<<<<<<<<
 *         result = PyTuple_New(lst.length)
 *         for i in range(lst.length):
 */
  __pyx_t_1 = (__pyx_v_lst != NULL);
  if (__pyx_t_1) {

    /* "pglast/ast.pyx":45
 *     cdef int i
 *     if lst is not NULL:
 *         result = PyTuple_New(lst.length)             # <<<<<<<<<<<<<<
 *         for i in range(lst.length):
 *             item = create(structs.list_nth(lst, i), offset_to_index)
 */
    __pyx_t_2 = PyTuple_New(__pyx_v_lst->length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pglast/ast.pyx":46
 *     if lst is not NULL:
 *         result = PyTuple_New(lst.length)
 *         for i in range(lst.length):             # <<<<<<<<<<<<<<
 *             item = create(structs.list_nth(lst, i), offset_to_index)
 *             Py_INCREF(item)
 */
    __pyx_t_3 = __pyx_v_lst->length;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "pglast/ast.pyx":47
 *         result = PyTuple_New(lst.length)
 *         for i in range(lst.length):
 *             item = create(structs.list_nth(lst, i), offset_to_index)             # <<<<<<<<<<<<<<
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(result, i, item)
 */
      __pyx_t_2 = __pyx_f_6pglast_6parser_create(list_nth(__pyx_v_lst, __pyx_v_i), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pglast/ast.pyx":48
 *         for i in range(lst.length):
 *             item = create(structs.list_nth(lst, i), offset_to_index)
 *             Py_INCREF(item)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(result, i, item)
 *     else:
 */
      Py_INCREF(__pyx_v_item);

      /* "pglast/ast.pyx":49
 *             item = create(structs.list_nth(lst, i), offset_to_index)
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(result, i, item)             # <<<<<<<<<<<<<<
 *     else:
 *         result = None
 */
      PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_item);
    }

    /* "pglast/ast.pyx":44
 *     cdef tuple result
 *     cdef int i
 *     if lst is not NULL:             # <<<<<<<<<<<<<<
 *         result = PyTuple_New(lst.length)
 *         for i in range(lst.length):
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":51
 *             PyTuple_SET_ITEM(result, i, item)
 *     else:
 *         result = None             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_result = ((PyObject*)Py_None);
  }
  __pyx_L3:;

  /* "pglast/ast.pyx":52
 *     else:
 *         result = None
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pglast/ast.pyx":41
 * 
 * 
 * cdef _pg_list_to_tuple(const structs.List* lst, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple result
 *     cdef int i
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pglast.parser._pg_list_to_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":55
 * 
 * 
 * cdef create_Query(structs.Query* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)
 */

static PyObject *__pyx_f_6pglast_6parser_create_Query(Query *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_commandType = 0;
  PyObject *__pyx_v_v_querySource = 0;
  PyObject *__pyx_v_v_queryId = 0;
  PyObject *__pyx_v_v_canSetTag = 0;
  PyObject *__pyx_v_v_utilityStmt = 0;
  PyObject *__pyx_v_v_resultRelation = 0;
  PyObject *__pyx_v_v_hasAggs = 0;
  PyObject *__pyx_v_v_hasWindowFuncs = 0;
  PyObject *__pyx_v_v_hasTargetSRFs = 0;
  PyObject *__pyx_v_v_hasSubLinks = 0;
  PyObject *__pyx_v_v_hasDistinctOn = 0;
  PyObject *__pyx_v_v_hasRecursive = 0;
  PyObject *__pyx_v_v_hasModifyingCTE = 0;
  PyObject *__pyx_v_v_hasForUpdate = 0;
  PyObject *__pyx_v_v_hasRowSecurity = 0;
  PyObject *__pyx_v_v_isReturn = 0;
  PyObject *__pyx_v_v_cteList = 0;
  PyObject *__pyx_v_v_rtable = 0;
  PyObject *__pyx_v_v_jointree = 0;
  PyObject *__pyx_v_v_mergeActionList = 0;
  PyObject *__pyx_v_v_mergeUseOuterJoin = 0;
  PyObject *__pyx_v_v_targetList = 0;
  PyObject *__pyx_v_v_override = 0;
  PyObject *__pyx_v_v_onConflict = 0;
  PyObject *__pyx_v_v_returningList = 0;
  PyObject *__pyx_v_v_groupClause = 0;
  PyObject *__pyx_v_v_groupDistinct = 0;
  PyObject *__pyx_v_v_groupingSets = 0;
  PyObject *__pyx_v_v_havingQual = 0;
  PyObject *__pyx_v_v_windowClause = 0;
  PyObject *__pyx_v_v_distinctClause = 0;
  PyObject *__pyx_v_v_sortClause = 0;
  PyObject *__pyx_v_v_limitOffset = 0;
  PyObject *__pyx_v_v_limitCount = 0;
  PyObject *__pyx_v_v_limitOption = 0;
  PyObject *__pyx_v_v_rowMarks = 0;
  PyObject *__pyx_v_v_setOperations = 0;
  PyObject *__pyx_v_v_constraintDeps = 0;
  PyObject *__pyx_v_v_withCheckOptions = 0;
  PyObject *__pyx_v_v_stmt_location = 0;
  PyObject *__pyx_v_v_stmt_len = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Query", 0);

  /* "pglast/ast.pyx":56
 * 
 * cdef create_Query(structs.Query* data, offset_to_index):
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)             # <<<<<<<<<<<<<<
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)
 *     cdef object v_queryId = data.queryId
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CmdType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CmdType(__pyx_v_data->commandType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_commandType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":57
 * cdef create_Query(structs.Query* data, offset_to_index):
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)             # <<<<<<<<<<<<<<
 *     cdef object v_queryId = data.queryId
 *     cdef object v_canSetTag = bool(data.canSetTag)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_QuerySource); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_QuerySource(__pyx_v_data->querySource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_querySource = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":58
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)
 *     cdef object v_queryId = data.queryId             # <<<<<<<<<<<<<<
 *     cdef object v_canSetTag = bool(data.canSetTag)
 *     cdef object v_utilityStmt = create(data.utilityStmt, offset_to_index) if data.utilityStmt is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_data->queryId); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_queryId = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":59
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)
 *     cdef object v_queryId = data.queryId
 *     cdef object v_canSetTag = bool(data.canSetTag)             # <<<<<<<<<<<<<<
 *     cdef object v_utilityStmt = create(data.utilityStmt, offset_to_index) if data.utilityStmt is not NULL else None
 *     cdef object v_resultRelation = data.resultRelation
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->canSetTag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_canSetTag = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":60
 *     cdef object v_queryId = data.queryId
 *     cdef object v_canSetTag = bool(data.canSetTag)
 *     cdef object v_utilityStmt = create(data.utilityStmt, offset_to_index) if data.utilityStmt is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_resultRelation = data.resultRelation
 *     cdef object v_hasAggs = bool(data.hasAggs)
 */
  if ((__pyx_v_data->utilityStmt != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->utilityStmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_utilityStmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":61
 *     cdef object v_canSetTag = bool(data.canSetTag)
 *     cdef object v_utilityStmt = create(data.utilityStmt, offset_to_index) if data.utilityStmt is not NULL else None
 *     cdef object v_resultRelation = data.resultRelation             # <<<<<<<<<<<<<<
 *     cdef object v_hasAggs = bool(data.hasAggs)
 *     cdef object v_hasWindowFuncs = bool(data.hasWindowFuncs)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->resultRelation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resultRelation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":62
 *     cdef object v_utilityStmt = create(data.utilityStmt, offset_to_index) if data.utilityStmt is not NULL else None
 *     cdef object v_resultRelation = data.resultRelation
 *     cdef object v_hasAggs = bool(data.hasAggs)             # <<<<<<<<<<<<<<
 *     cdef object v_hasWindowFuncs = bool(data.hasWindowFuncs)
 *     cdef object v_hasTargetSRFs = bool(data.hasTargetSRFs)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasAggs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasAggs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":63
 *     cdef object v_resultRelation = data.resultRelation
 *     cdef object v_hasAggs = bool(data.hasAggs)
 *     cdef object v_hasWindowFuncs = bool(data.hasWindowFuncs)             # <<<<<<<<<<<<<<
 *     cdef object v_hasTargetSRFs = bool(data.hasTargetSRFs)
 *     cdef object v_hasSubLinks = bool(data.hasSubLinks)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasWindowFuncs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasWindowFuncs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":64
 *     cdef object v_hasAggs = bool(data.hasAggs)
 *     cdef object v_hasWindowFuncs = bool(data.hasWindowFuncs)
 *     cdef object v_hasTargetSRFs = bool(data.hasTargetSRFs)             # <<<<<<<<<<<<<<
 *     cdef object v_hasSubLinks = bool(data.hasSubLinks)
 *     cdef object v_hasDistinctOn = bool(data.hasDistinctOn)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasTargetSRFs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasTargetSRFs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":65
 *     cdef object v_hasWindowFuncs = bool(data.hasWindowFuncs)
 *     cdef object v_hasTargetSRFs = bool(data.hasTargetSRFs)
 *     cdef object v_hasSubLinks = bool(data.hasSubLinks)             # <<<<<<<<<<<<<<
 *     cdef object v_hasDistinctOn = bool(data.hasDistinctOn)
 *     cdef object v_hasRecursive = bool(data.hasRecursive)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasSubLinks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasSubLinks = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":66
 *     cdef object v_hasTargetSRFs = bool(data.hasTargetSRFs)
 *     cdef object v_hasSubLinks = bool(data.hasSubLinks)
 *     cdef object v_hasDistinctOn = bool(data.hasDistinctOn)             # <<<<<<<<<<<<<<
 *     cdef object v_hasRecursive = bool(data.hasRecursive)
 *     cdef object v_hasModifyingCTE = bool(data.hasModifyingCTE)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasDistinctOn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasDistinctOn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":67
 *     cdef object v_hasSubLinks = bool(data.hasSubLinks)
 *     cdef object v_hasDistinctOn = bool(data.hasDistinctOn)
 *     cdef object v_hasRecursive = bool(data.hasRecursive)             # <<<<<<<<<<<<<<
 *     cdef object v_hasModifyingCTE = bool(data.hasModifyingCTE)
 *     cdef object v_hasForUpdate = bool(data.hasForUpdate)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasRecursive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasRecursive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":68
 *     cdef object v_hasDistinctOn = bool(data.hasDistinctOn)
 *     cdef object v_hasRecursive = bool(data.hasRecursive)
 *     cdef object v_hasModifyingCTE = bool(data.hasModifyingCTE)             # <<<<<<<<<<<<<<
 *     cdef object v_hasForUpdate = bool(data.hasForUpdate)
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasModifyingCTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasModifyingCTE = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":69
 *     cdef object v_hasRecursive = bool(data.hasRecursive)
 *     cdef object v_hasModifyingCTE = bool(data.hasModifyingCTE)
 *     cdef object v_hasForUpdate = bool(data.hasForUpdate)             # <<<<<<<<<<<<<<
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)
 *     cdef object v_isReturn = bool(data.isReturn)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasForUpdate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasForUpdate = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":70
 *     cdef object v_hasModifyingCTE = bool(data.hasModifyingCTE)
 *     cdef object v_hasForUpdate = bool(data.hasForUpdate)
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)             # <<<<<<<<<<<<<<
 *     cdef object v_isReturn = bool(data.isReturn)
 *     cdef tuple v_cteList = _pg_list_to_tuple(data.cteList, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hasRowSecurity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasRowSecurity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":71
 *     cdef object v_hasForUpdate = bool(data.hasForUpdate)
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)
 *     cdef object v_isReturn = bool(data.isReturn)             # <<<<<<<<<<<<<<
 *     cdef tuple v_cteList = _pg_list_to_tuple(data.cteList, offset_to_index)
 *     cdef tuple v_rtable = _pg_list_to_tuple(data.rtable, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isReturn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isReturn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":72
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)
 *     cdef object v_isReturn = bool(data.isReturn)
 *     cdef tuple v_cteList = _pg_list_to_tuple(data.cteList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_rtable = _pg_list_to_tuple(data.rtable, offset_to_index)
 *     cdef object v_jointree = create(data.jointree, offset_to_index) if data.jointree is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->cteList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 72, __pyx_L1_error)
  __pyx_v_v_cteList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":73
 *     cdef object v_isReturn = bool(data.isReturn)
 *     cdef tuple v_cteList = _pg_list_to_tuple(data.cteList, offset_to_index)
 *     cdef tuple v_rtable = _pg_list_to_tuple(data.rtable, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_jointree = create(data.jointree, offset_to_index) if data.jointree is not NULL else None
 *     cdef tuple v_mergeActionList = _pg_list_to_tuple(data.mergeActionList, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->rtable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 73, __pyx_L1_error)
  __pyx_v_v_rtable = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":74
 *     cdef tuple v_cteList = _pg_list_to_tuple(data.cteList, offset_to_index)
 *     cdef tuple v_rtable = _pg_list_to_tuple(data.rtable, offset_to_index)
 *     cdef object v_jointree = create(data.jointree, offset_to_index) if data.jointree is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_mergeActionList = _pg_list_to_tuple(data.mergeActionList, offset_to_index)
 *     cdef object v_mergeUseOuterJoin = bool(data.mergeUseOuterJoin)
 */
  if ((__pyx_v_data->jointree != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->jointree, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_jointree = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":75
 *     cdef tuple v_rtable = _pg_list_to_tuple(data.rtable, offset_to_index)
 *     cdef object v_jointree = create(data.jointree, offset_to_index) if data.jointree is not NULL else None
 *     cdef tuple v_mergeActionList = _pg_list_to_tuple(data.mergeActionList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_mergeUseOuterJoin = bool(data.mergeUseOuterJoin)
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->mergeActionList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 75, __pyx_L1_error)
  __pyx_v_v_mergeActionList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":76
 *     cdef object v_jointree = create(data.jointree, offset_to_index) if data.jointree is not NULL else None
 *     cdef tuple v_mergeActionList = _pg_list_to_tuple(data.mergeActionList, offset_to_index)
 *     cdef object v_mergeUseOuterJoin = bool(data.mergeUseOuterJoin)             # <<<<<<<<<<<<<<
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->mergeUseOuterJoin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_mergeUseOuterJoin = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":77
 *     cdef tuple v_mergeActionList = _pg_list_to_tuple(data.mergeActionList, offset_to_index)
 *     cdef object v_mergeUseOuterJoin = bool(data.mergeUseOuterJoin)
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_onConflict = create(data.onConflict, offset_to_index) if data.onConflict is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->targetList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 77, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":78
 *     cdef object v_mergeUseOuterJoin = bool(data.mergeUseOuterJoin)
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)             # <<<<<<<<<<<<<<
 *     cdef object v_onConflict = create(data.onConflict, offset_to_index) if data.onConflict is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":79
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_onConflict = create(data.onConflict, offset_to_index) if data.onConflict is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 */
  if ((__pyx_v_data->onConflict != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->onConflict, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_onConflict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":80
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_onConflict = create(data.onConflict, offset_to_index) if data.onConflict is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->returningList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 80, __pyx_L1_error)
  __pyx_v_v_returningList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":81
 *     cdef object v_onConflict = create(data.onConflict, offset_to_index) if data.onConflict is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 *     cdef tuple v_groupingSets = _pg_list_to_tuple(data.groupingSets, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->groupClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 81, __pyx_L1_error)
  __pyx_v_v_groupClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":82
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 *     cdef object v_groupDistinct = bool(data.groupDistinct)             # <<<<<<<<<<<<<<
 *     cdef tuple v_groupingSets = _pg_list_to_tuple(data.groupingSets, offset_to_index)
 *     cdef object v_havingQual = create(data.havingQual, offset_to_index) if data.havingQual is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->groupDistinct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_groupDistinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":83
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 *     cdef tuple v_groupingSets = _pg_list_to_tuple(data.groupingSets, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_havingQual = create(data.havingQual, offset_to_index) if data.havingQual is not NULL else None
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->groupingSets, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 83, __pyx_L1_error)
  __pyx_v_v_groupingSets = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":84
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 *     cdef tuple v_groupingSets = _pg_list_to_tuple(data.groupingSets, offset_to_index)
 *     cdef object v_havingQual = create(data.havingQual, offset_to_index) if data.havingQual is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 */
  if ((__pyx_v_data->havingQual != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->havingQual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_havingQual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":85
 *     cdef tuple v_groupingSets = _pg_list_to_tuple(data.groupingSets, offset_to_index)
 *     cdef object v_havingQual = create(data.havingQual, offset_to_index) if data.havingQual is not NULL else None
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->windowClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 85, __pyx_L1_error)
  __pyx_v_v_windowClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":86
 *     cdef object v_havingQual = create(data.havingQual, offset_to_index) if data.havingQual is not NULL else None
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->distinctClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 86, __pyx_L1_error)
  __pyx_v_v_distinctClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":87
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->sortClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 87, __pyx_L1_error)
  __pyx_v_v_sortClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":88
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 */
  if ((__pyx_v_data->limitOffset != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_limitOffset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":89
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 *     cdef tuple v_rowMarks = _pg_list_to_tuple(data.rowMarks, offset_to_index)
 */
  if ((__pyx_v_data->limitCount != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitCount, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_limitCount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":90
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)             # <<<<<<<<<<<<<<
 *     cdef tuple v_rowMarks = _pg_list_to_tuple(data.rowMarks, offset_to_index)
 *     cdef object v_setOperations = create(data.setOperations, offset_to_index) if data.setOperations is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_LimitOption); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_LimitOption(__pyx_v_data->limitOption); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_limitOption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":91
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 *     cdef tuple v_rowMarks = _pg_list_to_tuple(data.rowMarks, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_setOperations = create(data.setOperations, offset_to_index) if data.setOperations is not NULL else None
 *     cdef tuple v_constraintDeps = _pg_list_to_tuple(data.constraintDeps, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->rowMarks, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 91, __pyx_L1_error)
  __pyx_v_v_rowMarks = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":92
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 *     cdef tuple v_rowMarks = _pg_list_to_tuple(data.rowMarks, offset_to_index)
 *     cdef object v_setOperations = create(data.setOperations, offset_to_index) if data.setOperations is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_constraintDeps = _pg_list_to_tuple(data.constraintDeps, offset_to_index)
 *     cdef tuple v_withCheckOptions = _pg_list_to_tuple(data.withCheckOptions, offset_to_index)
 */
  if ((__pyx_v_data->setOperations != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setOperations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_setOperations = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":93
 *     cdef tuple v_rowMarks = _pg_list_to_tuple(data.rowMarks, offset_to_index)
 *     cdef object v_setOperations = create(data.setOperations, offset_to_index) if data.setOperations is not NULL else None
 *     cdef tuple v_constraintDeps = _pg_list_to_tuple(data.constraintDeps, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_withCheckOptions = _pg_list_to_tuple(data.withCheckOptions, offset_to_index)
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->constraintDeps, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 93, __pyx_L1_error)
  __pyx_v_v_constraintDeps = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":94
 *     cdef object v_setOperations = create(data.setOperations, offset_to_index) if data.setOperations is not NULL else None
 *     cdef tuple v_constraintDeps = _pg_list_to_tuple(data.constraintDeps, offset_to_index)
 *     cdef tuple v_withCheckOptions = _pg_list_to_tuple(data.withCheckOptions, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->withCheckOptions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 94, __pyx_L1_error)
  __pyx_v_v_withCheckOptions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":95
 *     cdef tuple v_constraintDeps = _pg_list_to_tuple(data.constraintDeps, offset_to_index)
 *     cdef tuple v_withCheckOptions = _pg_list_to_tuple(data.withCheckOptions, offset_to_index)
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)             # <<<<<<<<<<<<<<
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)
 *     return ast.Query(v_commandType, v_querySource, v_queryId, v_canSetTag, v_utilityStmt, v_resultRelation, v_hasAggs, v_hasWindowFuncs, v_hasTargetSRFs, v_hasSubLinks, v_hasDistinctOn, v_hasRecursive, v_hasModifyingCTE, v_hasForUpdate, v_hasRowSecurity, v_isReturn, v_cteList, v_rtable, v_jointree, v_mergeActionList, v_mergeUseOuterJoin, v_targetList, v_override, v_onConflict, v_returningList, v_groupClause, v_groupDistinct, v_groupingSets, v_havingQual, v_windowClause, v_distinctClause, v_sortClause, v_limitOffset, v_limitCount, v_limitOption, v_rowMarks, v_setOperations, v_constraintDeps, v_withCheckOptions, v_stmt_location, v_stmt_len)
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_stmt_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":96
 *     cdef tuple v_withCheckOptions = _pg_list_to_tuple(data.withCheckOptions, offset_to_index)
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)             # <<<<<<<<<<<<<<
 *     return ast.Query(v_commandType, v_querySource, v_queryId, v_canSetTag, v_utilityStmt, v_resultRelation, v_hasAggs, v_hasWindowFuncs, v_hasTargetSRFs, v_hasSubLinks, v_hasDistinctOn, v_hasRecursive, v_hasModifyingCTE, v_hasForUpdate, v_hasRowSecurity, v_isReturn, v_cteList, v_rtable, v_jointree, v_mergeActionList, v_mergeUseOuterJoin, v_targetList, v_override, v_onConflict, v_returningList, v_groupClause, v_groupDistinct, v_groupingSets, v_havingQual, v_windowClause, v_distinctClause, v_sortClause, v_limitOffset, v_limitCount, v_limitOption, v_rowMarks, v_setOperations, v_constraintDeps, v_withCheckOptions, v_stmt_location, v_stmt_len)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_data->stmt_location + __pyx_v_data->stmt_len)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_7 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_v_stmt_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pglast/ast.pyx":97
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)
 *     return ast.Query(v_commandType, v_querySource, v_queryId, v_canSetTag, v_utilityStmt, v_resultRelation, v_hasAggs, v_hasWindowFuncs, v_hasTargetSRFs, v_hasSubLinks, v_hasDistinctOn, v_hasRecursive, v_hasModifyingCTE, v_hasForUpdate, v_hasRowSecurity, v_isReturn, v_cteList, v_rtable, v_jointree, v_mergeActionList, v_mergeUseOuterJoin, v_targetList, v_override, v_onConflict, v_returningList, v_groupClause, v_groupDistinct, v_groupingSets, v_havingQual, v_windowClause, v_distinctClause, v_sortClause, v_limitOffset, v_limitCount, v_limitOption, v_rowMarks, v_setOperations, v_constraintDeps, v_withCheckOptions, v_stmt_location, v_stmt_len)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[42] = {__pyx_t_2, __pyx_v_v_commandType, __pyx_v_v_querySource, __pyx_v_v_queryId, __pyx_v_v_canSetTag, __pyx_v_v_utilityStmt, __pyx_v_v_resultRelation, __pyx_v_v_hasAggs, __pyx_v_v_hasWindowFuncs, __pyx_v_v_hasTargetSRFs, __pyx_v_v_hasSubLinks, __pyx_v_v_hasDistinctOn, __pyx_v_v_hasRecursive, __pyx_v_v_hasModifyingCTE, __pyx_v_v_hasForUpdate, __pyx_v_v_hasRowSecurity, __pyx_v_v_isReturn, __pyx_v_v_cteList, __pyx_v_v_rtable, __pyx_v_v_jointree, __pyx_v_v_mergeActionList, __pyx_v_v_mergeUseOuterJoin, __pyx_v_v_targetList, __pyx_v_v_override, __pyx_v_v_onConflict, __pyx_v_v_returningList, __pyx_v_v_groupClause, __pyx_v_v_groupDistinct, __pyx_v_v_groupingSets, __pyx_v_v_havingQual, __pyx_v_v_windowClause, __pyx_v_v_distinctClause, __pyx_v_v_sortClause, __pyx_v_v_limitOffset, __pyx_v_v_limitCount, __pyx_v_v_limitOption, __pyx_v_v_rowMarks, __pyx_v_v_setOperations, __pyx_v_v_constraintDeps, __pyx_v_v_withCheckOptions, __pyx_v_v_stmt_location, __pyx_v_v_stmt_len};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 41+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":55
 * 
 * 
 * cdef create_Query(structs.Query* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_Query", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_commandType);
  __Pyx_XDECREF(__pyx_v_v_querySource);
  __Pyx_XDECREF(__pyx_v_v_queryId);
  __Pyx_XDECREF(__pyx_v_v_canSetTag);
  __Pyx_XDECREF(__pyx_v_v_utilityStmt);
  __Pyx_XDECREF(__pyx_v_v_resultRelation);
  __Pyx_XDECREF(__pyx_v_v_hasAggs);
  __Pyx_XDECREF(__pyx_v_v_hasWindowFuncs);
  __Pyx_XDECREF(__pyx_v_v_hasTargetSRFs);
  __Pyx_XDECREF(__pyx_v_v_hasSubLinks);
  __Pyx_XDECREF(__pyx_v_v_hasDistinctOn);
  __Pyx_XDECREF(__pyx_v_v_hasRecursive);
  __Pyx_XDECREF(__pyx_v_v_hasModifyingCTE);
  __Pyx_XDECREF(__pyx_v_v_hasForUpdate);
  __Pyx_XDECREF(__pyx_v_v_hasRowSecurity);
  __Pyx_XDECREF(__pyx_v_v_isReturn);
  __Pyx_XDECREF(__pyx_v_v_cteList);
  __Pyx_XDECREF(__pyx_v_v_rtable);
  __Pyx_XDECREF(__pyx_v_v_jointree);
  __Pyx_XDECREF(__pyx_v_v_mergeActionList);
  __Pyx_XDECREF(__pyx_v_v_mergeUseOuterJoin);
  __Pyx_XDECREF(__pyx_v_v_targetList);
  __Pyx_XDECREF(__pyx_v_v_override);
  __Pyx_XDECREF(__pyx_v_v_onConflict);
  __Pyx_XDECREF(__pyx_v_v_returningList);
  __Pyx_XDECREF(__pyx_v_v_groupClause);
  __Pyx_XDECREF(__pyx_v_v_groupDistinct);
  __Pyx_XDECREF(__pyx_v_v_groupingSets);
  __Pyx_XDECREF(__pyx_v_v_havingQual);
  __Pyx_XDECREF(__pyx_v_v_windowClause);
  __Pyx_XDECREF(__pyx_v_v_distinctClause);
  __Pyx_XDECREF(__pyx_v_v_sortClause);
  __Pyx_XDECREF(__pyx_v_v_limitOffset);
  __Pyx_XDECREF(__pyx_v_v_limitCount);
  __Pyx_XDECREF(__pyx_v_v_limitOption);
  __Pyx_XDECREF(__pyx_v_v_rowMarks);
  __Pyx_XDECREF(__pyx_v_v_setOperations);
  __Pyx_XDECREF(__pyx_v_v_constraintDeps);
  __Pyx_XDECREF(__pyx_v_v_withCheckOptions);
  __Pyx_XDECREF(__pyx_v_v_stmt_location);
  __Pyx_XDECREF(__pyx_v_v_stmt_len);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":100
 * 
 * 
 * cdef create_TypeName(structs.TypeName* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_names = _pg_list_to_tuple(data.names, offset_to_index)
 *     cdef object v_setof = bool(data.setof)
 */

static PyObject *__pyx_f_6pglast_6parser_create_TypeName(TypeName *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_names = 0;
  PyObject *__pyx_v_v_setof = 0;
  PyObject *__pyx_v_v_pct_type = 0;
  PyObject *__pyx_v_v_typmods = 0;
  PyObject *__pyx_v_v_typemod = 0;
  PyObject *__pyx_v_v_arrayBounds = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TypeName", 0);

  /* "pglast/ast.pyx":101
 * 
 * cdef create_TypeName(structs.TypeName* data, offset_to_index):
 *     cdef tuple v_names = _pg_list_to_tuple(data.names, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_setof = bool(data.setof)
 *     cdef object v_pct_type = bool(data.pct_type)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->names, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 101, __pyx_L1_error)
  __pyx_v_v_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":102
 * cdef create_TypeName(structs.TypeName* data, offset_to_index):
 *     cdef tuple v_names = _pg_list_to_tuple(data.names, offset_to_index)
 *     cdef object v_setof = bool(data.setof)             # <<<<<<<<<<<<<<
 *     cdef object v_pct_type = bool(data.pct_type)
 *     cdef tuple v_typmods = _pg_list_to_tuple(data.typmods, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->setof); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_setof = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":103
 *     cdef tuple v_names = _pg_list_to_tuple(data.names, offset_to_index)
 *     cdef object v_setof = bool(data.setof)
 *     cdef object v_pct_type = bool(data.pct_type)             # <<<<<<<<<<<<<<
 *     cdef tuple v_typmods = _pg_list_to_tuple(data.typmods, offset_to_index)
 *     cdef object v_typemod = data.typemod
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->pct_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_pct_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":104
 *     cdef object v_setof = bool(data.setof)
 *     cdef object v_pct_type = bool(data.pct_type)
 *     cdef tuple v_typmods = _pg_list_to_tuple(data.typmods, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_typemod = data.typemod
 *     cdef tuple v_arrayBounds = _pg_list_to_tuple(data.arrayBounds, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->typmods, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 104, __pyx_L1_error)
  __pyx_v_v_typmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":105
 *     cdef object v_pct_type = bool(data.pct_type)
 *     cdef tuple v_typmods = _pg_list_to_tuple(data.typmods, offset_to_index)
 *     cdef object v_typemod = data.typemod             # <<<<<<<<<<<<<<
 *     cdef tuple v_arrayBounds = _pg_list_to_tuple(data.arrayBounds, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->typemod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typemod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":106
 *     cdef tuple v_typmods = _pg_list_to_tuple(data.typmods, offset_to_index)
 *     cdef object v_typemod = data.typemod
 *     cdef tuple v_arrayBounds = _pg_list_to_tuple(data.arrayBounds, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TypeName(v_names, v_setof, v_pct_type, v_typmods, v_typemod, v_arrayBounds, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->arrayBounds, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 106, __pyx_L1_error)
  __pyx_v_v_arrayBounds = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":107
 *     cdef object v_typemod = data.typemod
 *     cdef tuple v_arrayBounds = _pg_list_to_tuple(data.arrayBounds, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.TypeName(v_names, v_setof, v_pct_type, v_typmods, v_typemod, v_arrayBounds, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":108
 *     cdef tuple v_arrayBounds = _pg_list_to_tuple(data.arrayBounds, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TypeName(v_names, v_setof, v_pct_type, v_typmods, v_typemod, v_arrayBounds, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TypeName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __pyx_v_v_names, __pyx_v_v_setof, __pyx_v_v_pct_type, __pyx_v_v_typmods, __pyx_v_v_typemod, __pyx_v_v_arrayBounds, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 7+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __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;

  /* "pglast/ast.pyx":100
 * 
 * 
 * cdef create_TypeName(structs.TypeName* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_names = _pg_list_to_tuple(data.names, offset_to_index)
 *     cdef object v_setof = bool(data.setof)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_TypeName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_names);
  __Pyx_XDECREF(__pyx_v_v_setof);
  __Pyx_XDECREF(__pyx_v_v_pct_type);
  __Pyx_XDECREF(__pyx_v_v_typmods);
  __Pyx_XDECREF(__pyx_v_v_typemod);
  __Pyx_XDECREF(__pyx_v_v_arrayBounds);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":111
 * 
 * 
 * cdef create_ColumnRef(structs.ColumnRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_fields = _pg_list_to_tuple(data.fields, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ColumnRef(ColumnRef *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_fields = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ColumnRef", 0);

  /* "pglast/ast.pyx":112
 * 
 * cdef create_ColumnRef(structs.ColumnRef* data, offset_to_index):
 *     cdef tuple v_fields = _pg_list_to_tuple(data.fields, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ColumnRef(v_fields, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fields, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 112, __pyx_L1_error)
  __pyx_v_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":113
 * cdef create_ColumnRef(structs.ColumnRef* data, offset_to_index):
 *     cdef tuple v_fields = _pg_list_to_tuple(data.fields, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ColumnRef(v_fields, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":114
 *     cdef tuple v_fields = _pg_list_to_tuple(data.fields, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ColumnRef(v_fields, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ColumnRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_fields, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __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;

  /* "pglast/ast.pyx":111
 * 
 * 
 * cdef create_ColumnRef(structs.ColumnRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_fields = _pg_list_to_tuple(data.fields, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ColumnRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_fields);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":117
 * 
 * 
 * cdef create_ParamRef(structs.ParamRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_number = data.number
 *     cdef object v_location = offset_to_index(data.location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ParamRef(ParamRef *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_number = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ParamRef", 0);

  /* "pglast/ast.pyx":118
 * 
 * cdef create_ParamRef(structs.ParamRef* data, offset_to_index):
 *     cdef object v_number = data.number             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ParamRef(v_number, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_number = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":119
 * cdef create_ParamRef(structs.ParamRef* data, offset_to_index):
 *     cdef object v_number = data.number
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ParamRef(v_number, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":120
 *     cdef object v_number = data.number
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ParamRef(v_number, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ParamRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_number, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __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;

  /* "pglast/ast.pyx":117
 * 
 * 
 * cdef create_ParamRef(structs.ParamRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_number = data.number
 *     cdef object v_location = offset_to_index(data.location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ParamRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_number);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":123
 * 
 * 
 * cdef create_A_Expr(structs.A_Expr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'A_Expr_Kind')(data.kind)
 *     cdef tuple v_name = _pg_list_to_tuple(data.name, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_A_Expr(A_Expr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_lexpr = 0;
  PyObject *__pyx_v_v_rexpr = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Expr", 0);

  /* "pglast/ast.pyx":124
 * 
 * cdef create_A_Expr(structs.A_Expr* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'A_Expr_Kind')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef tuple v_name = _pg_list_to_tuple(data.name, offset_to_index)
 *     cdef object v_lexpr = create(data.lexpr, offset_to_index) if data.lexpr is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_A_Expr_Kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_A_Expr_Kind(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":125
 * cdef create_A_Expr(structs.A_Expr* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'A_Expr_Kind')(data.kind)
 *     cdef tuple v_name = _pg_list_to_tuple(data.name, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_lexpr = create(data.lexpr, offset_to_index) if data.lexpr is not NULL else None
 *     cdef object v_rexpr = create(data.rexpr, offset_to_index) if data.rexpr is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 125, __pyx_L1_error)
  __pyx_v_v_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":126
 *     cdef object v_kind = getattr(enums, 'A_Expr_Kind')(data.kind)
 *     cdef tuple v_name = _pg_list_to_tuple(data.name, offset_to_index)
 *     cdef object v_lexpr = create(data.lexpr, offset_to_index) if data.lexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rexpr = create(data.rexpr, offset_to_index) if data.rexpr is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->lexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->lexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_lexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":127
 *     cdef tuple v_name = _pg_list_to_tuple(data.name, offset_to_index)
 *     cdef object v_lexpr = create(data.lexpr, offset_to_index) if data.lexpr is not NULL else None
 *     cdef object v_rexpr = create(data.rexpr, offset_to_index) if data.rexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_Expr(v_kind, v_name, v_lexpr, v_rexpr, v_location)
 */
  if ((__pyx_v_data->rexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":128
 *     cdef object v_lexpr = create(data.lexpr, offset_to_index) if data.lexpr is not NULL else None
 *     cdef object v_rexpr = create(data.rexpr, offset_to_index) if data.rexpr is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.A_Expr(v_kind, v_name, v_lexpr, v_rexpr, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":129
 *     cdef object v_rexpr = create(data.rexpr, offset_to_index) if data.rexpr is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_Expr(v_kind, v_name, v_lexpr, v_rexpr, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_A_Expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_kind, __pyx_v_v_name, __pyx_v_v_lexpr, __pyx_v_v_rexpr, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __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;

  /* "pglast/ast.pyx":123
 * 
 * 
 * cdef create_A_Expr(structs.A_Expr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'A_Expr_Kind')(data.kind)
 *     cdef tuple v_name = _pg_list_to_tuple(data.name, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_A_Expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_lexpr);
  __Pyx_XDECREF(__pyx_v_v_rexpr);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":132
 * 
 * 
 * cdef create_TypeCast(structs.TypeCast* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_TypeCast(TypeCast *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TypeCast", 0);

  /* "pglast/ast.pyx":133
 * 
 * cdef create_TypeCast(structs.TypeCast* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":134
 * cdef create_TypeCast(structs.TypeCast* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TypeCast(v_arg, v_typeName, v_location)
 */
  if ((__pyx_v_data->typeName != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_typeName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":135
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.TypeCast(v_arg, v_typeName, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":136
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TypeCast(v_arg, v_typeName, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TypeCast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_arg, __pyx_v_v_typeName, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __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;

  /* "pglast/ast.pyx":132
 * 
 * 
 * cdef create_TypeCast(structs.TypeCast* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_TypeCast", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":139
 * 
 * 
 * cdef create_CollateClause(structs.CollateClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CollateClause(CollateClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_collname = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CollateClause", 0);

  /* "pglast/ast.pyx":140
 * 
 * cdef create_CollateClause(structs.CollateClause* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":141
 * cdef create_CollateClause(structs.CollateClause* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CollateClause(v_arg, v_collname, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->collname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 141, __pyx_L1_error)
  __pyx_v_v_collname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":142
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CollateClause(v_arg, v_collname, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":143
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CollateClause(v_arg, v_collname, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CollateClause); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_arg, __pyx_v_v_collname, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __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;

  /* "pglast/ast.pyx":139
 * 
 * 
 * cdef create_CollateClause(structs.CollateClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CollateClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_collname);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":146
 * 
 * 
 * cdef create_RoleSpec(structs.RoleSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_roletype = getattr(enums, 'RoleSpecType')(data.roletype)
 *     cdef object v_rolename = data.rolename.decode("utf-8") if data.rolename is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_RoleSpec(RoleSpec *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_roletype = 0;
  PyObject *__pyx_v_v_rolename = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RoleSpec", 0);

  /* "pglast/ast.pyx":147
 * 
 * cdef create_RoleSpec(structs.RoleSpec* data, offset_to_index):
 *     cdef object v_roletype = getattr(enums, 'RoleSpecType')(data.roletype)             # <<<<<<<<<<<<<<
 *     cdef object v_rolename = data.rolename.decode("utf-8") if data.rolename is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_RoleSpecType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_RoleSpecType(__pyx_v_data->roletype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_roletype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":148
 * cdef create_RoleSpec(structs.RoleSpec* data, offset_to_index):
 *     cdef object v_roletype = getattr(enums, 'RoleSpecType')(data.roletype)
 *     cdef object v_rolename = data.rolename.decode("utf-8") if data.rolename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RoleSpec(v_roletype, v_rolename, v_location)
 */
  if ((__pyx_v_data->rolename != NULL)) {
    __pyx_t_6 = __pyx_v_data->rolename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rolename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":149
 *     cdef object v_roletype = getattr(enums, 'RoleSpecType')(data.roletype)
 *     cdef object v_rolename = data.rolename.decode("utf-8") if data.rolename is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.RoleSpec(v_roletype, v_rolename, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":150
 *     cdef object v_rolename = data.rolename.decode("utf-8") if data.rolename is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RoleSpec(v_roletype, v_rolename, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RoleSpec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_roletype, __pyx_v_v_rolename, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __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;

  /* "pglast/ast.pyx":146
 * 
 * 
 * cdef create_RoleSpec(structs.RoleSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_roletype = getattr(enums, 'RoleSpecType')(data.roletype)
 *     cdef object v_rolename = data.rolename.decode("utf-8") if data.rolename is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RoleSpec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_roletype);
  __Pyx_XDECREF(__pyx_v_v_rolename);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":153
 * 
 * 
 * cdef create_FuncCall(structs.FuncCall* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_FuncCall(FuncCall *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_funcname = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_agg_order = 0;
  PyObject *__pyx_v_v_agg_filter = 0;
  PyObject *__pyx_v_v_over = 0;
  PyObject *__pyx_v_v_agg_within_group = 0;
  PyObject *__pyx_v_v_agg_star = 0;
  PyObject *__pyx_v_v_agg_distinct = 0;
  PyObject *__pyx_v_v_func_variadic = 0;
  PyObject *__pyx_v_v_funcformat = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FuncCall", 0);

  /* "pglast/ast.pyx":154
 * 
 * cdef create_FuncCall(structs.FuncCall* data, offset_to_index):
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funcname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 154, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":155
 * cdef create_FuncCall(structs.FuncCall* data, offset_to_index):
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 155, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":156
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->agg_order, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 156, __pyx_L1_error)
  __pyx_v_v_agg_order = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":157
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None
 *     cdef object v_agg_within_group = bool(data.agg_within_group)
 */
  if ((__pyx_v_data->agg_filter != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->agg_filter, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_agg_filter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":158
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_agg_within_group = bool(data.agg_within_group)
 *     cdef object v_agg_star = bool(data.agg_star)
 */
  if ((__pyx_v_data->over != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->over, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_over = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":159
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None
 *     cdef object v_agg_within_group = bool(data.agg_within_group)             # <<<<<<<<<<<<<<
 *     cdef object v_agg_star = bool(data.agg_star)
 *     cdef object v_agg_distinct = bool(data.agg_distinct)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->agg_within_group); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agg_within_group = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":160
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None
 *     cdef object v_agg_within_group = bool(data.agg_within_group)
 *     cdef object v_agg_star = bool(data.agg_star)             # <<<<<<<<<<<<<<
 *     cdef object v_agg_distinct = bool(data.agg_distinct)
 *     cdef object v_func_variadic = bool(data.func_variadic)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->agg_star); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agg_star = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":161
 *     cdef object v_agg_within_group = bool(data.agg_within_group)
 *     cdef object v_agg_star = bool(data.agg_star)
 *     cdef object v_agg_distinct = bool(data.agg_distinct)             # <<<<<<<<<<<<<<
 *     cdef object v_func_variadic = bool(data.func_variadic)
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->agg_distinct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agg_distinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":162
 *     cdef object v_agg_star = bool(data.agg_star)
 *     cdef object v_agg_distinct = bool(data.agg_distinct)
 *     cdef object v_func_variadic = bool(data.func_variadic)             # <<<<<<<<<<<<<<
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->func_variadic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_func_variadic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":163
 *     cdef object v_agg_distinct = bool(data.agg_distinct)
 *     cdef object v_func_variadic = bool(data.func_variadic)
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.FuncCall(v_funcname, v_args, v_agg_order, v_agg_filter, v_over, v_agg_within_group, v_agg_star, v_agg_distinct, v_func_variadic, v_funcformat, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->funcformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_funcformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":164
 *     cdef object v_func_variadic = bool(data.func_variadic)
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.FuncCall(v_funcname, v_args, v_agg_order, v_agg_filter, v_over, v_agg_within_group, v_agg_star, v_agg_distinct, v_func_variadic, v_funcformat, v_location)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":165
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.FuncCall(v_funcname, v_args, v_agg_order, v_agg_filter, v_over, v_agg_within_group, v_agg_star, v_agg_distinct, v_func_variadic, v_funcformat, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FuncCall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[12] = {__pyx_t_2, __pyx_v_v_funcname, __pyx_v_v_args, __pyx_v_v_agg_order, __pyx_v_v_agg_filter, __pyx_v_v_over, __pyx_v_v_agg_within_group, __pyx_v_v_agg_star, __pyx_v_v_agg_distinct, __pyx_v_v_func_variadic, __pyx_v_v_funcformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 11+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":153
 * 
 * 
 * cdef create_FuncCall(structs.FuncCall* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_FuncCall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_funcname);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_agg_order);
  __Pyx_XDECREF(__pyx_v_v_agg_filter);
  __Pyx_XDECREF(__pyx_v_v_over);
  __Pyx_XDECREF(__pyx_v_v_agg_within_group);
  __Pyx_XDECREF(__pyx_v_v_agg_star);
  __Pyx_XDECREF(__pyx_v_v_agg_distinct);
  __Pyx_XDECREF(__pyx_v_v_func_variadic);
  __Pyx_XDECREF(__pyx_v_v_funcformat);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":168
 * 
 * 
 * cdef create_A_Star(structs.A_Star* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     return ast.A_Star()
 * 
 */

static PyObject *__pyx_f_6pglast_6parser_create_A_Star(CYTHON_UNUSED A_Star *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Star", 0);

  /* "pglast/ast.pyx":169
 * 
 * cdef create_A_Star(structs.A_Star* data, offset_to_index):
 *     return ast.A_Star()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_A_Star); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __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;

  /* "pglast/ast.pyx":168
 * 
 * 
 * cdef create_A_Star(structs.A_Star* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     return ast.A_Star()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_A_Star", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":172
 * 
 * 
 * cdef create_A_Indices(structs.A_Indices* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_is_slice = bool(data.is_slice)
 *     cdef object v_lidx = create(data.lidx, offset_to_index) if data.lidx is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_A_Indices(A_Indices *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_is_slice = 0;
  PyObject *__pyx_v_v_lidx = 0;
  PyObject *__pyx_v_v_uidx = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Indices", 0);

  /* "pglast/ast.pyx":173
 * 
 * cdef create_A_Indices(structs.A_Indices* data, offset_to_index):
 *     cdef object v_is_slice = bool(data.is_slice)             # <<<<<<<<<<<<<<
 *     cdef object v_lidx = create(data.lidx, offset_to_index) if data.lidx is not NULL else None
 *     cdef object v_uidx = create(data.uidx, offset_to_index) if data.uidx is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_slice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_slice = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":174
 * cdef create_A_Indices(structs.A_Indices* data, offset_to_index):
 *     cdef object v_is_slice = bool(data.is_slice)
 *     cdef object v_lidx = create(data.lidx, offset_to_index) if data.lidx is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_uidx = create(data.uidx, offset_to_index) if data.uidx is not NULL else None
 *     return ast.A_Indices(v_is_slice, v_lidx, v_uidx)
 */
  if ((__pyx_v_data->lidx != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->lidx, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_lidx = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":175
 *     cdef object v_is_slice = bool(data.is_slice)
 *     cdef object v_lidx = create(data.lidx, offset_to_index) if data.lidx is not NULL else None
 *     cdef object v_uidx = create(data.uidx, offset_to_index) if data.uidx is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.A_Indices(v_is_slice, v_lidx, v_uidx)
 * 
 */
  if ((__pyx_v_data->uidx != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->uidx, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_uidx = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":176
 *     cdef object v_lidx = create(data.lidx, offset_to_index) if data.lidx is not NULL else None
 *     cdef object v_uidx = create(data.uidx, offset_to_index) if data.uidx is not NULL else None
 *     return ast.A_Indices(v_is_slice, v_lidx, v_uidx)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_A_Indices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_is_slice, __pyx_v_v_lidx, __pyx_v_v_uidx};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":172
 * 
 * 
 * cdef create_A_Indices(structs.A_Indices* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_is_slice = bool(data.is_slice)
 *     cdef object v_lidx = create(data.lidx, offset_to_index) if data.lidx is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_A_Indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_is_slice);
  __Pyx_XDECREF(__pyx_v_v_lidx);
  __Pyx_XDECREF(__pyx_v_v_uidx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":179
 * 
 * 
 * cdef create_A_Indirection(structs.A_Indirection* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_A_Indirection(A_Indirection *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_indirection = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Indirection", 0);

  /* "pglast/ast.pyx":180
 * 
 * cdef create_A_Indirection(structs.A_Indirection* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     return ast.A_Indirection(v_arg, v_indirection)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":181
 * cdef create_A_Indirection(structs.A_Indirection* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.A_Indirection(v_arg, v_indirection)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->indirection, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 181, __pyx_L1_error)
  __pyx_v_v_indirection = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":182
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     return ast.A_Indirection(v_arg, v_indirection)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_A_Indirection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_indirection};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __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;

  /* "pglast/ast.pyx":179
 * 
 * 
 * cdef create_A_Indirection(structs.A_Indirection* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_A_Indirection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_indirection);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":185
 * 
 * 
 * cdef create_A_ArrayExpr(structs.A_ArrayExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_A_ArrayExpr(A_ArrayExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_elements = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_ArrayExpr", 0);

  /* "pglast/ast.pyx":186
 * 
 * cdef create_A_ArrayExpr(structs.A_ArrayExpr* data, offset_to_index):
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_ArrayExpr(v_elements, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->elements, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 186, __pyx_L1_error)
  __pyx_v_v_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":187
 * cdef create_A_ArrayExpr(structs.A_ArrayExpr* data, offset_to_index):
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.A_ArrayExpr(v_elements, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":188
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_ArrayExpr(v_elements, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_A_ArrayExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_elements, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __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;

  /* "pglast/ast.pyx":185
 * 
 * 
 * cdef create_A_ArrayExpr(structs.A_ArrayExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_A_ArrayExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_elements);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":191
 * 
 * 
 * cdef create_ResTarget(structs.ResTarget* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ResTarget(ResTarget *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_indirection = 0;
  PyObject *__pyx_v_v_val = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ResTarget", 0);

  /* "pglast/ast.pyx":192
 * 
 * cdef create_ResTarget(structs.ResTarget* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":193
 * cdef create_ResTarget(structs.ResTarget* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->indirection, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 193, __pyx_L1_error)
  __pyx_v_v_indirection = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":194
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ResTarget(v_name, v_indirection, v_val, v_location)
 */
  if ((__pyx_v_data->val != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->val, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_val = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":195
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ResTarget(v_name, v_indirection, v_val, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":196
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ResTarget(v_name, v_indirection, v_val, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ResTarget); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_name, __pyx_v_v_indirection, __pyx_v_v_val, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __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;

  /* "pglast/ast.pyx":191
 * 
 * 
 * cdef create_ResTarget(structs.ResTarget* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_ResTarget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_indirection);
  __Pyx_XDECREF(__pyx_v_v_val);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":199
 * 
 * 
 * cdef create_MultiAssignRef(structs.MultiAssignRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_source = create(data.source, offset_to_index) if data.source is not NULL else None
 *     cdef object v_colno = data.colno
 */

static PyObject *__pyx_f_6pglast_6parser_create_MultiAssignRef(MultiAssignRef *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_source = 0;
  PyObject *__pyx_v_v_colno = 0;
  PyObject *__pyx_v_v_ncolumns = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MultiAssignRef", 0);

  /* "pglast/ast.pyx":200
 * 
 * cdef create_MultiAssignRef(structs.MultiAssignRef* data, offset_to_index):
 *     cdef object v_source = create(data.source, offset_to_index) if data.source is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_colno = data.colno
 *     cdef object v_ncolumns = data.ncolumns
 */
  if ((__pyx_v_data->source != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->source, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_source = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":201
 * cdef create_MultiAssignRef(structs.MultiAssignRef* data, offset_to_index):
 *     cdef object v_source = create(data.source, offset_to_index) if data.source is not NULL else None
 *     cdef object v_colno = data.colno             # <<<<<<<<<<<<<<
 *     cdef object v_ncolumns = data.ncolumns
 *     return ast.MultiAssignRef(v_source, v_colno, v_ncolumns)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->colno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_colno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":202
 *     cdef object v_source = create(data.source, offset_to_index) if data.source is not NULL else None
 *     cdef object v_colno = data.colno
 *     cdef object v_ncolumns = data.ncolumns             # <<<<<<<<<<<<<<
 *     return ast.MultiAssignRef(v_source, v_colno, v_ncolumns)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->ncolumns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ncolumns = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":203
 *     cdef object v_colno = data.colno
 *     cdef object v_ncolumns = data.ncolumns
 *     return ast.MultiAssignRef(v_source, v_colno, v_ncolumns)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_MultiAssignRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_source, __pyx_v_v_colno, __pyx_v_v_ncolumns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __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;

  /* "pglast/ast.pyx":199
 * 
 * 
 * cdef create_MultiAssignRef(structs.MultiAssignRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_source = create(data.source, offset_to_index) if data.source is not NULL else None
 *     cdef object v_colno = data.colno
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_MultiAssignRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_source);
  __Pyx_XDECREF(__pyx_v_v_colno);
  __Pyx_XDECREF(__pyx_v_v_ncolumns);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":206
 * 
 * 
 * cdef create_SortBy(structs.SortBy* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_node = create(data.node, offset_to_index) if data.node is not NULL else None
 *     cdef object v_sortby_dir = getattr(enums, 'SortByDir')(data.sortby_dir)
 */

static PyObject *__pyx_f_6pglast_6parser_create_SortBy(SortBy *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_node = 0;
  PyObject *__pyx_v_v_sortby_dir = 0;
  PyObject *__pyx_v_v_sortby_nulls = 0;
  PyObject *__pyx_v_v_useOp = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SortBy", 0);

  /* "pglast/ast.pyx":207
 * 
 * cdef create_SortBy(structs.SortBy* data, offset_to_index):
 *     cdef object v_node = create(data.node, offset_to_index) if data.node is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_sortby_dir = getattr(enums, 'SortByDir')(data.sortby_dir)
 *     cdef object v_sortby_nulls = getattr(enums, 'SortByNulls')(data.sortby_nulls)
 */
  if ((__pyx_v_data->node != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->node, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_node = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":208
 * cdef create_SortBy(structs.SortBy* data, offset_to_index):
 *     cdef object v_node = create(data.node, offset_to_index) if data.node is not NULL else None
 *     cdef object v_sortby_dir = getattr(enums, 'SortByDir')(data.sortby_dir)             # <<<<<<<<<<<<<<
 *     cdef object v_sortby_nulls = getattr(enums, 'SortByNulls')(data.sortby_nulls)
 *     cdef tuple v_useOp = _pg_list_to_tuple(data.useOp, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_SortByDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_SortByDir(__pyx_v_data->sortby_dir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_sortby_dir = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":209
 *     cdef object v_node = create(data.node, offset_to_index) if data.node is not NULL else None
 *     cdef object v_sortby_dir = getattr(enums, 'SortByDir')(data.sortby_dir)
 *     cdef object v_sortby_nulls = getattr(enums, 'SortByNulls')(data.sortby_nulls)             # <<<<<<<<<<<<<<
 *     cdef tuple v_useOp = _pg_list_to_tuple(data.useOp, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_SortByNulls); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_SortByNulls(__pyx_v_data->sortby_nulls); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_sortby_nulls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":210
 *     cdef object v_sortby_dir = getattr(enums, 'SortByDir')(data.sortby_dir)
 *     cdef object v_sortby_nulls = getattr(enums, 'SortByNulls')(data.sortby_nulls)
 *     cdef tuple v_useOp = _pg_list_to_tuple(data.useOp, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SortBy(v_node, v_sortby_dir, v_sortby_nulls, v_useOp, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->useOp, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 210, __pyx_L1_error)
  __pyx_v_v_useOp = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":211
 *     cdef object v_sortby_nulls = getattr(enums, 'SortByNulls')(data.sortby_nulls)
 *     cdef tuple v_useOp = _pg_list_to_tuple(data.useOp, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.SortBy(v_node, v_sortby_dir, v_sortby_nulls, v_useOp, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":212
 *     cdef tuple v_useOp = _pg_list_to_tuple(data.useOp, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SortBy(v_node, v_sortby_dir, v_sortby_nulls, v_useOp, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SortBy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_node, __pyx_v_v_sortby_dir, __pyx_v_v_sortby_nulls, __pyx_v_v_useOp, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __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;

  /* "pglast/ast.pyx":206
 * 
 * 
 * cdef create_SortBy(structs.SortBy* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_node = create(data.node, offset_to_index) if data.node is not NULL else None
 *     cdef object v_sortby_dir = getattr(enums, 'SortByDir')(data.sortby_dir)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SortBy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_node);
  __Pyx_XDECREF(__pyx_v_v_sortby_dir);
  __Pyx_XDECREF(__pyx_v_v_sortby_nulls);
  __Pyx_XDECREF(__pyx_v_v_useOp);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":215
 * 
 * 
 * cdef create_WindowDef(structs.WindowDef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_WindowDef(WindowDef *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_refname = 0;
  PyObject *__pyx_v_v_partitionClause = 0;
  PyObject *__pyx_v_v_orderClause = 0;
  PyObject *__pyx_v_v_frameOptions = 0;
  PyObject *__pyx_v_v_startOffset = 0;
  PyObject *__pyx_v_v_endOffset = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WindowDef", 0);

  /* "pglast/ast.pyx":216
 * 
 * cdef create_WindowDef(structs.WindowDef* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":217
 * cdef create_WindowDef(structs.WindowDef* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 */
  if ((__pyx_v_data->refname != NULL)) {
    __pyx_t_4 = __pyx_v_data->refname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_refname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":218
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 *     cdef object v_frameOptions = data.frameOptions
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->partitionClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 218, __pyx_L1_error)
  __pyx_v_v_partitionClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":219
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_frameOptions = data.frameOptions
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->orderClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 219, __pyx_L1_error)
  __pyx_v_v_orderClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":220
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 *     cdef object v_frameOptions = data.frameOptions             # <<<<<<<<<<<<<<
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->frameOptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_frameOptions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":221
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 *     cdef object v_frameOptions = data.frameOptions
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->startOffset != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->startOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_startOffset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":222
 *     cdef object v_frameOptions = data.frameOptions
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.WindowDef(v_name, v_refname, v_partitionClause, v_orderClause, v_frameOptions, v_startOffset, v_endOffset, v_location)
 */
  if ((__pyx_v_data->endOffset != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->endOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_endOffset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":223
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.WindowDef(v_name, v_refname, v_partitionClause, v_orderClause, v_frameOptions, v_startOffset, v_endOffset, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_5 = __pyx_v_offset_to_index; __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":224
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.WindowDef(v_name, v_refname, v_partitionClause, v_orderClause, v_frameOptions, v_startOffset, v_endOffset, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WindowDef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_5, __pyx_v_v_name, __pyx_v_v_refname, __pyx_v_v_partitionClause, __pyx_v_v_orderClause, __pyx_v_v_frameOptions, __pyx_v_v_startOffset, __pyx_v_v_endOffset, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 8+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __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;

  /* "pglast/ast.pyx":215
 * 
 * 
 * cdef create_WindowDef(structs.WindowDef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_WindowDef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_refname);
  __Pyx_XDECREF(__pyx_v_v_partitionClause);
  __Pyx_XDECREF(__pyx_v_v_orderClause);
  __Pyx_XDECREF(__pyx_v_v_frameOptions);
  __Pyx_XDECREF(__pyx_v_v_startOffset);
  __Pyx_XDECREF(__pyx_v_v_endOffset);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":227
 * 
 * 
 * cdef create_RangeSubselect(structs.RangeSubselect* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeSubselect(RangeSubselect *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_lateral = 0;
  PyObject *__pyx_v_v_subquery = 0;
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeSubselect", 0);

  /* "pglast/ast.pyx":228
 * 
 * cdef create_RangeSubselect(structs.RangeSubselect* data, offset_to_index):
 *     cdef object v_lateral = bool(data.lateral)             # <<<<<<<<<<<<<<
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->lateral); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":229
 * cdef create_RangeSubselect(structs.RangeSubselect* data, offset_to_index):
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     return ast.RangeSubselect(v_lateral, v_subquery, v_alias)
 */
  if ((__pyx_v_data->subquery != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->subquery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_subquery = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":230
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.RangeSubselect(v_lateral, v_subquery, v_alias)
 * 
 */
  if ((__pyx_v_data->alias != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_alias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":231
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     return ast.RangeSubselect(v_lateral, v_subquery, v_alias)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RangeSubselect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_lateral, __pyx_v_v_subquery, __pyx_v_v_alias};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":227
 * 
 * 
 * cdef create_RangeSubselect(structs.RangeSubselect* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RangeSubselect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_lateral);
  __Pyx_XDECREF(__pyx_v_v_subquery);
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":234
 * 
 * 
 * cdef create_RangeFunction(structs.RangeFunction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_ordinality = bool(data.ordinality)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeFunction(RangeFunction *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_lateral = 0;
  PyObject *__pyx_v_v_ordinality = 0;
  PyObject *__pyx_v_v_is_rowsfrom = 0;
  PyObject *__pyx_v_v_functions = 0;
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_v_v_coldeflist = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeFunction", 0);

  /* "pglast/ast.pyx":235
 * 
 * cdef create_RangeFunction(structs.RangeFunction* data, offset_to_index):
 *     cdef object v_lateral = bool(data.lateral)             # <<<<<<<<<<<<<<
 *     cdef object v_ordinality = bool(data.ordinality)
 *     cdef object v_is_rowsfrom = bool(data.is_rowsfrom)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->lateral); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":236
 * cdef create_RangeFunction(structs.RangeFunction* data, offset_to_index):
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_ordinality = bool(data.ordinality)             # <<<<<<<<<<<<<<
 *     cdef object v_is_rowsfrom = bool(data.is_rowsfrom)
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->ordinality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ordinality = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":237
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_ordinality = bool(data.ordinality)
 *     cdef object v_is_rowsfrom = bool(data.is_rowsfrom)             # <<<<<<<<<<<<<<
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_rowsfrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_rowsfrom = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":238
 *     cdef object v_ordinality = bool(data.ordinality)
 *     cdef object v_is_rowsfrom = bool(data.is_rowsfrom)
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->functions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 238, __pyx_L1_error)
  __pyx_v_v_functions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":239
 *     cdef object v_is_rowsfrom = bool(data.is_rowsfrom)
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)
 *     return ast.RangeFunction(v_lateral, v_ordinality, v_is_rowsfrom, v_functions, v_alias, v_coldeflist)
 */
  if ((__pyx_v_data->alias != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_alias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":240
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.RangeFunction(v_lateral, v_ordinality, v_is_rowsfrom, v_functions, v_alias, v_coldeflist)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->coldeflist, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 240, __pyx_L1_error)
  __pyx_v_v_coldeflist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":241
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)
 *     return ast.RangeFunction(v_lateral, v_ordinality, v_is_rowsfrom, v_functions, v_alias, v_coldeflist)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RangeFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_lateral, __pyx_v_v_ordinality, __pyx_v_v_is_rowsfrom, __pyx_v_v_functions, __pyx_v_v_alias, __pyx_v_v_coldeflist};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":234
 * 
 * 
 * cdef create_RangeFunction(structs.RangeFunction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_ordinality = bool(data.ordinality)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RangeFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_lateral);
  __Pyx_XDECREF(__pyx_v_v_ordinality);
  __Pyx_XDECREF(__pyx_v_v_is_rowsfrom);
  __Pyx_XDECREF(__pyx_v_v_functions);
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XDECREF(__pyx_v_v_coldeflist);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":244
 * 
 * 
 * cdef create_RangeTableFunc(structs.RangeTableFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeTableFunc(RangeTableFunc *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_lateral = 0;
  PyObject *__pyx_v_v_docexpr = 0;
  PyObject *__pyx_v_v_rowexpr = 0;
  PyObject *__pyx_v_v_namespaces = 0;
  PyObject *__pyx_v_v_columns = 0;
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTableFunc", 0);

  /* "pglast/ast.pyx":245
 * 
 * cdef create_RangeTableFunc(structs.RangeTableFunc* data, offset_to_index):
 *     cdef object v_lateral = bool(data.lateral)             # <<<<<<<<<<<<<<
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->lateral); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":246
 * cdef create_RangeTableFunc(structs.RangeTableFunc* data, offset_to_index):
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 *     cdef tuple v_namespaces = _pg_list_to_tuple(data.namespaces, offset_to_index)
 */
  if ((__pyx_v_data->docexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->docexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_docexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":247
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_namespaces = _pg_list_to_tuple(data.namespaces, offset_to_index)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 */
  if ((__pyx_v_data->rowexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rowexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rowexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":248
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 *     cdef tuple v_namespaces = _pg_list_to_tuple(data.namespaces, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->namespaces, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 248, __pyx_L1_error)
  __pyx_v_v_namespaces = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":249
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 *     cdef tuple v_namespaces = _pg_list_to_tuple(data.namespaces, offset_to_index)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->columns, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 249, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":250
 *     cdef tuple v_namespaces = _pg_list_to_tuple(data.namespaces, offset_to_index)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeTableFunc(v_lateral, v_docexpr, v_rowexpr, v_namespaces, v_columns, v_alias, v_location)
 */
  if ((__pyx_v_data->alias != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_alias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":251
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.RangeTableFunc(v_lateral, v_docexpr, v_rowexpr, v_namespaces, v_columns, v_alias, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":252
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeTableFunc(v_lateral, v_docexpr, v_rowexpr, v_namespaces, v_columns, v_alias, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_RangeTableFunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __pyx_v_v_lateral, __pyx_v_v_docexpr, __pyx_v_v_rowexpr, __pyx_v_v_namespaces, __pyx_v_v_columns, __pyx_v_v_alias, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 7+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __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;

  /* "pglast/ast.pyx":244
 * 
 * 
 * cdef create_RangeTableFunc(structs.RangeTableFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_RangeTableFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_lateral);
  __Pyx_XDECREF(__pyx_v_v_docexpr);
  __Pyx_XDECREF(__pyx_v_v_rowexpr);
  __Pyx_XDECREF(__pyx_v_v_namespaces);
  __Pyx_XDECREF(__pyx_v_v_columns);
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":255
 * 
 * 
 * cdef create_RangeTableFuncCol(structs.RangeTableFuncCol* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeTableFuncCol(RangeTableFuncCol *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_colname = 0;
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_for_ordinality = 0;
  PyObject *__pyx_v_v_is_not_null = 0;
  PyObject *__pyx_v_v_colexpr = 0;
  PyObject *__pyx_v_v_coldefexpr = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTableFuncCol", 0);

  /* "pglast/ast.pyx":256
 * 
 * cdef create_RangeTableFuncCol(structs.RangeTableFuncCol* data, offset_to_index):
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_for_ordinality = bool(data.for_ordinality)
 */
  if ((__pyx_v_data->colname != NULL)) {
    __pyx_t_2 = __pyx_v_data->colname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_colname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":257
 * cdef create_RangeTableFuncCol(structs.RangeTableFuncCol* data, offset_to_index):
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_for_ordinality = bool(data.for_ordinality)
 *     cdef object v_is_not_null = bool(data.is_not_null)
 */
  if ((__pyx_v_data->typeName != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_typeName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":258
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_for_ordinality = bool(data.for_ordinality)             # <<<<<<<<<<<<<<
 *     cdef object v_is_not_null = bool(data.is_not_null)
 *     cdef object v_colexpr = create(data.colexpr, offset_to_index) if data.colexpr is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->for_ordinality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_ordinality = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":259
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_for_ordinality = bool(data.for_ordinality)
 *     cdef object v_is_not_null = bool(data.is_not_null)             # <<<<<<<<<<<<<<
 *     cdef object v_colexpr = create(data.colexpr, offset_to_index) if data.colexpr is not NULL else None
 *     cdef object v_coldefexpr = create(data.coldefexpr, offset_to_index) if data.coldefexpr is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_not_null); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_not_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":260
 *     cdef object v_for_ordinality = bool(data.for_ordinality)
 *     cdef object v_is_not_null = bool(data.is_not_null)
 *     cdef object v_colexpr = create(data.colexpr, offset_to_index) if data.colexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_coldefexpr = create(data.coldefexpr, offset_to_index) if data.coldefexpr is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->colexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->colexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_colexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":261
 *     cdef object v_is_not_null = bool(data.is_not_null)
 *     cdef object v_colexpr = create(data.colexpr, offset_to_index) if data.colexpr is not NULL else None
 *     cdef object v_coldefexpr = create(data.coldefexpr, offset_to_index) if data.coldefexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeTableFuncCol(v_colname, v_typeName, v_for_ordinality, v_is_not_null, v_colexpr, v_coldefexpr, v_location)
 */
  if ((__pyx_v_data->coldefexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->coldefexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_coldefexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":262
 *     cdef object v_colexpr = create(data.colexpr, offset_to_index) if data.colexpr is not NULL else None
 *     cdef object v_coldefexpr = create(data.coldefexpr, offset_to_index) if data.coldefexpr is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.RangeTableFuncCol(v_colname, v_typeName, v_for_ordinality, v_is_not_null, v_colexpr, v_coldefexpr, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_5 = __pyx_v_offset_to_index; __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":263
 *     cdef object v_coldefexpr = create(data.coldefexpr, offset_to_index) if data.coldefexpr is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeTableFuncCol(v_colname, v_typeName, v_for_ordinality, v_is_not_null, v_colexpr, v_coldefexpr, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_RangeTableFuncCol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_5, __pyx_v_v_colname, __pyx_v_v_typeName, __pyx_v_v_for_ordinality, __pyx_v_v_is_not_null, __pyx_v_v_colexpr, __pyx_v_v_coldefexpr, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 7+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __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;

  /* "pglast/ast.pyx":255
 * 
 * 
 * cdef create_RangeTableFuncCol(structs.RangeTableFuncCol* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_RangeTableFuncCol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_colname);
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_for_ordinality);
  __Pyx_XDECREF(__pyx_v_v_is_not_null);
  __Pyx_XDECREF(__pyx_v_v_colexpr);
  __Pyx_XDECREF(__pyx_v_v_coldefexpr);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":266
 * 
 * 
 * cdef create_RangeTableSample(structs.RangeTableSample* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_method = _pg_list_to_tuple(data.method, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeTableSample(RangeTableSample *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_method = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_repeatable = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTableSample", 0);

  /* "pglast/ast.pyx":267
 * 
 * cdef create_RangeTableSample(structs.RangeTableSample* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_method = _pg_list_to_tuple(data.method, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":268
 * cdef create_RangeTableSample(structs.RangeTableSample* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_method = _pg_list_to_tuple(data.method, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->method, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 268, __pyx_L1_error)
  __pyx_v_v_method = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":269
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_method = _pg_list_to_tuple(data.method, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 269, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":270
 *     cdef tuple v_method = _pg_list_to_tuple(data.method, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeTableSample(v_relation, v_method, v_args, v_repeatable, v_location)
 */
  if ((__pyx_v_data->repeatable != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->repeatable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_repeatable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":271
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.RangeTableSample(v_relation, v_method, v_args, v_repeatable, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":272
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeTableSample(v_relation, v_method, v_args, v_repeatable, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RangeTableSample); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_method, __pyx_v_v_args, __pyx_v_v_repeatable, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __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;

  /* "pglast/ast.pyx":266
 * 
 * 
 * cdef create_RangeTableSample(structs.RangeTableSample* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_method = _pg_list_to_tuple(data.method, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RangeTableSample", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_method);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_repeatable);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":275
 * 
 * 
 * cdef create_ColumnDef(structs.ColumnDef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_ColumnDef(ColumnDef *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_colname = 0;
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_compression = 0;
  PyObject *__pyx_v_v_inhcount = 0;
  PyObject *__pyx_v_v_is_local = 0;
  PyObject *__pyx_v_v_is_not_null = 0;
  PyObject *__pyx_v_v_is_from_type = 0;
  PyObject *__pyx_v_v_storage = 0;
  PyObject *__pyx_v_v_raw_default = 0;
  PyObject *__pyx_v_v_cooked_default = 0;
  PyObject *__pyx_v_v_identity = 0;
  PyObject *__pyx_v_v_identitySequence = 0;
  PyObject *__pyx_v_v_generated = 0;
  PyObject *__pyx_v_v_collClause = 0;
  PyObject *__pyx_v_v_constraints = 0;
  PyObject *__pyx_v_v_fdwoptions = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ColumnDef", 0);

  /* "pglast/ast.pyx":276
 * 
 * cdef create_ColumnDef(structs.ColumnDef* data, offset_to_index):
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_compression = data.compression.decode("utf-8") if data.compression is not NULL else None
 */
  if ((__pyx_v_data->colname != NULL)) {
    __pyx_t_2 = __pyx_v_data->colname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_colname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":277
 * cdef create_ColumnDef(structs.ColumnDef* data, offset_to_index):
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_compression = data.compression.decode("utf-8") if data.compression is not NULL else None
 *     cdef object v_inhcount = data.inhcount
 */
  if ((__pyx_v_data->typeName != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_typeName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":278
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_compression = data.compression.decode("utf-8") if data.compression is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_inhcount = data.inhcount
 *     cdef object v_is_local = bool(data.is_local)
 */
  if ((__pyx_v_data->compression != NULL)) {
    __pyx_t_4 = __pyx_v_data->compression;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_compression = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":279
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_compression = data.compression.decode("utf-8") if data.compression is not NULL else None
 *     cdef object v_inhcount = data.inhcount             # <<<<<<<<<<<<<<
 *     cdef object v_is_local = bool(data.is_local)
 *     cdef object v_is_not_null = bool(data.is_not_null)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->inhcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inhcount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":280
 *     cdef object v_compression = data.compression.decode("utf-8") if data.compression is not NULL else None
 *     cdef object v_inhcount = data.inhcount
 *     cdef object v_is_local = bool(data.is_local)             # <<<<<<<<<<<<<<
 *     cdef object v_is_not_null = bool(data.is_not_null)
 *     cdef object v_is_from_type = bool(data.is_from_type)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_local); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_local = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":281
 *     cdef object v_inhcount = data.inhcount
 *     cdef object v_is_local = bool(data.is_local)
 *     cdef object v_is_not_null = bool(data.is_not_null)             # <<<<<<<<<<<<<<
 *     cdef object v_is_from_type = bool(data.is_from_type)
 *     cdef object v_storage = chr(data.storage)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_not_null); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_not_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":282
 *     cdef object v_is_local = bool(data.is_local)
 *     cdef object v_is_not_null = bool(data.is_not_null)
 *     cdef object v_is_from_type = bool(data.is_from_type)             # <<<<<<<<<<<<<<
 *     cdef object v_storage = chr(data.storage)
 *     cdef object v_raw_default = create(data.raw_default, offset_to_index) if data.raw_default is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_from_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_from_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":283
 *     cdef object v_is_not_null = bool(data.is_not_null)
 *     cdef object v_is_from_type = bool(data.is_from_type)
 *     cdef object v_storage = chr(data.storage)             # <<<<<<<<<<<<<<
 *     cdef object v_raw_default = create(data.raw_default, offset_to_index) if data.raw_default is not NULL else None
 *     cdef object v_cooked_default = create(data.cooked_default, offset_to_index) if data.cooked_default is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->storage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_storage = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":284
 *     cdef object v_is_from_type = bool(data.is_from_type)
 *     cdef object v_storage = chr(data.storage)
 *     cdef object v_raw_default = create(data.raw_default, offset_to_index) if data.raw_default is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cooked_default = create(data.cooked_default, offset_to_index) if data.cooked_default is not NULL else None
 *     cdef object v_identity = chr(data.identity)
 */
  if ((__pyx_v_data->raw_default != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->raw_default, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_raw_default = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":285
 *     cdef object v_storage = chr(data.storage)
 *     cdef object v_raw_default = create(data.raw_default, offset_to_index) if data.raw_default is not NULL else None
 *     cdef object v_cooked_default = create(data.cooked_default, offset_to_index) if data.cooked_default is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_identity = chr(data.identity)
 *     cdef object v_identitySequence = create(data.identitySequence, offset_to_index) if data.identitySequence is not NULL else None
 */
  if ((__pyx_v_data->cooked_default != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cooked_default, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_cooked_default = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":286
 *     cdef object v_raw_default = create(data.raw_default, offset_to_index) if data.raw_default is not NULL else None
 *     cdef object v_cooked_default = create(data.cooked_default, offset_to_index) if data.cooked_default is not NULL else None
 *     cdef object v_identity = chr(data.identity)             # <<<<<<<<<<<<<<
 *     cdef object v_identitySequence = create(data.identitySequence, offset_to_index) if data.identitySequence is not NULL else None
 *     cdef object v_generated = chr(data.generated)
 */
  __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_data->identity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_v_identity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":287
 *     cdef object v_cooked_default = create(data.cooked_default, offset_to_index) if data.cooked_default is not NULL else None
 *     cdef object v_identity = chr(data.identity)
 *     cdef object v_identitySequence = create(data.identitySequence, offset_to_index) if data.identitySequence is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_generated = chr(data.generated)
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 */
  if ((__pyx_v_data->identitySequence != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->identitySequence, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_identitySequence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":288
 *     cdef object v_identity = chr(data.identity)
 *     cdef object v_identitySequence = create(data.identitySequence, offset_to_index) if data.identitySequence is not NULL else None
 *     cdef object v_generated = chr(data.generated)             # <<<<<<<<<<<<<<
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->generated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_generated = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":289
 *     cdef object v_identitySequence = create(data.identitySequence, offset_to_index) if data.identitySequence is not NULL else None
 *     cdef object v_generated = chr(data.generated)
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef tuple v_fdwoptions = _pg_list_to_tuple(data.fdwoptions, offset_to_index)
 */
  if ((__pyx_v_data->collClause != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->collClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_collClause = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":290
 *     cdef object v_generated = chr(data.generated)
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_fdwoptions = _pg_list_to_tuple(data.fdwoptions, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->constraints, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 290, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":291
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef tuple v_fdwoptions = _pg_list_to_tuple(data.fdwoptions, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ColumnDef(v_colname, v_typeName, v_compression, v_inhcount, v_is_local, v_is_not_null, v_is_from_type, v_storage, v_raw_default, v_cooked_default, v_identity, v_identitySequence, v_generated, v_collClause, v_constraints, v_fdwoptions, v_location)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fdwoptions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 291, __pyx_L1_error)
  __pyx_v_v_fdwoptions = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":292
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef tuple v_fdwoptions = _pg_list_to_tuple(data.fdwoptions, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ColumnDef(v_colname, v_typeName, v_compression, v_inhcount, v_is_local, v_is_not_null, v_is_from_type, v_storage, v_raw_default, v_cooked_default, v_identity, v_identitySequence, v_generated, v_collClause, v_constraints, v_fdwoptions, v_location)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_v_location = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":293
 *     cdef tuple v_fdwoptions = _pg_list_to_tuple(data.fdwoptions, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ColumnDef(v_colname, v_typeName, v_compression, v_inhcount, v_is_local, v_is_not_null, v_is_from_type, v_storage, v_raw_default, v_cooked_default, v_identity, v_identitySequence, v_generated, v_collClause, v_constraints, v_fdwoptions, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ColumnDef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_8 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[18] = {__pyx_t_6, __pyx_v_v_colname, __pyx_v_v_typeName, __pyx_v_v_compression, __pyx_v_v_inhcount, __pyx_v_v_is_local, __pyx_v_v_is_not_null, __pyx_v_v_is_from_type, __pyx_v_v_storage, __pyx_v_v_raw_default, __pyx_v_v_cooked_default, __pyx_v_v_identity, __pyx_v_v_identitySequence, __pyx_v_v_generated, __pyx_v_v_collClause, __pyx_v_v_constraints, __pyx_v_v_fdwoptions, __pyx_v_v_location};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 17+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":275
 * 
 * 
 * cdef create_ColumnDef(structs.ColumnDef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_colname = data.colname.decode("utf-8") if data.colname is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_ColumnDef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_colname);
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_compression);
  __Pyx_XDECREF(__pyx_v_v_inhcount);
  __Pyx_XDECREF(__pyx_v_v_is_local);
  __Pyx_XDECREF(__pyx_v_v_is_not_null);
  __Pyx_XDECREF(__pyx_v_v_is_from_type);
  __Pyx_XDECREF(__pyx_v_v_storage);
  __Pyx_XDECREF(__pyx_v_v_raw_default);
  __Pyx_XDECREF(__pyx_v_v_cooked_default);
  __Pyx_XDECREF(__pyx_v_v_identity);
  __Pyx_XDECREF(__pyx_v_v_identitySequence);
  __Pyx_XDECREF(__pyx_v_v_generated);
  __Pyx_XDECREF(__pyx_v_v_collClause);
  __Pyx_XDECREF(__pyx_v_v_constraints);
  __Pyx_XDECREF(__pyx_v_v_fdwoptions);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":296
 * 
 * 
 * cdef create_TableLikeClause(structs.TableLikeClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_options = data.options
 */

static PyObject *__pyx_f_6pglast_6parser_create_TableLikeClause(TableLikeClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TableLikeClause", 0);

  /* "pglast/ast.pyx":297
 * 
 * cdef create_TableLikeClause(structs.TableLikeClause* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_options = data.options
 *     return ast.TableLikeClause(v_relation, v_options)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":298
 * cdef create_TableLikeClause(structs.TableLikeClause* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_options = data.options             # <<<<<<<<<<<<<<
 *     return ast.TableLikeClause(v_relation, v_options)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_options = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":299
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_options = data.options
 *     return ast.TableLikeClause(v_relation, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TableLikeClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __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;

  /* "pglast/ast.pyx":296
 * 
 * 
 * cdef create_TableLikeClause(structs.TableLikeClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_options = data.options
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_TableLikeClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":302
 * 
 * 
 * cdef create_IndexElem(structs.IndexElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_IndexElem(IndexElem *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_indexcolname = 0;
  PyObject *__pyx_v_v_collation = 0;
  PyObject *__pyx_v_v_opclass = 0;
  PyObject *__pyx_v_v_opclassopts = 0;
  PyObject *__pyx_v_v_ordering = 0;
  PyObject *__pyx_v_v_nulls_ordering = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_IndexElem", 0);

  /* "pglast/ast.pyx":303
 * 
 * cdef create_IndexElem(structs.IndexElem* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_indexcolname = data.indexcolname.decode("utf-8") if data.indexcolname is not NULL else None
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":304
 * cdef create_IndexElem(structs.IndexElem* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_indexcolname = data.indexcolname.decode("utf-8") if data.indexcolname is not NULL else None
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 */
  if ((__pyx_v_data->expr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":305
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_indexcolname = data.indexcolname.decode("utf-8") if data.indexcolname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 */
  if ((__pyx_v_data->indexcolname != NULL)) {
    __pyx_t_4 = __pyx_v_data->indexcolname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_indexcolname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":306
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_indexcolname = data.indexcolname.decode("utf-8") if data.indexcolname is not NULL else None
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 *     cdef tuple v_opclassopts = _pg_list_to_tuple(data.opclassopts, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->collation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 306, __pyx_L1_error)
  __pyx_v_v_collation = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":307
 *     cdef object v_indexcolname = data.indexcolname.decode("utf-8") if data.indexcolname is not NULL else None
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_opclassopts = _pg_list_to_tuple(data.opclassopts, offset_to_index)
 *     cdef object v_ordering = getattr(enums, 'SortByDir')(data.ordering)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opclass, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 307, __pyx_L1_error)
  __pyx_v_v_opclass = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":308
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 *     cdef tuple v_opclassopts = _pg_list_to_tuple(data.opclassopts, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_ordering = getattr(enums, 'SortByDir')(data.ordering)
 *     cdef object v_nulls_ordering = getattr(enums, 'SortByNulls')(data.nulls_ordering)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opclassopts, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 308, __pyx_L1_error)
  __pyx_v_v_opclassopts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":309
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 *     cdef tuple v_opclassopts = _pg_list_to_tuple(data.opclassopts, offset_to_index)
 *     cdef object v_ordering = getattr(enums, 'SortByDir')(data.ordering)             # <<<<<<<<<<<<<<
 *     cdef object v_nulls_ordering = getattr(enums, 'SortByNulls')(data.nulls_ordering)
 *     return ast.IndexElem(v_name, v_expr, v_indexcolname, v_collation, v_opclass, v_opclassopts, v_ordering, v_nulls_ordering)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_SortByDir); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_SortByDir(__pyx_v_data->ordering); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_ordering = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":310
 *     cdef tuple v_opclassopts = _pg_list_to_tuple(data.opclassopts, offset_to_index)
 *     cdef object v_ordering = getattr(enums, 'SortByDir')(data.ordering)
 *     cdef object v_nulls_ordering = getattr(enums, 'SortByNulls')(data.nulls_ordering)             # <<<<<<<<<<<<<<
 *     return ast.IndexElem(v_name, v_expr, v_indexcolname, v_collation, v_opclass, v_opclassopts, v_ordering, v_nulls_ordering)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_enums); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_5, __pyx_n_u_SortByNulls); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_SortByNulls(__pyx_v_data->nulls_ordering); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_nulls_ordering = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":311
 *     cdef object v_ordering = getattr(enums, 'SortByDir')(data.ordering)
 *     cdef object v_nulls_ordering = getattr(enums, 'SortByNulls')(data.nulls_ordering)
 *     return ast.IndexElem(v_name, v_expr, v_indexcolname, v_collation, v_opclass, v_opclassopts, v_ordering, v_nulls_ordering)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_IndexElem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_v_v_name, __pyx_v_v_expr, __pyx_v_v_indexcolname, __pyx_v_v_collation, __pyx_v_v_opclass, __pyx_v_v_opclassopts, __pyx_v_v_ordering, __pyx_v_v_nulls_ordering};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 8+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":302
 * 
 * 
 * cdef create_IndexElem(structs.IndexElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_IndexElem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_indexcolname);
  __Pyx_XDECREF(__pyx_v_v_collation);
  __Pyx_XDECREF(__pyx_v_v_opclass);
  __Pyx_XDECREF(__pyx_v_v_opclassopts);
  __Pyx_XDECREF(__pyx_v_v_ordering);
  __Pyx_XDECREF(__pyx_v_v_nulls_ordering);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":314
 * 
 * 
 * cdef create_DefElem(structs.DefElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_defnamespace = data.defnamespace.decode("utf-8") if data.defnamespace is not NULL else None
 *     cdef object v_defname = data.defname.decode("utf-8") if data.defname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_DefElem(DefElem *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_defnamespace = 0;
  PyObject *__pyx_v_v_defname = 0;
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_defaction = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DefElem", 0);

  /* "pglast/ast.pyx":315
 * 
 * cdef create_DefElem(structs.DefElem* data, offset_to_index):
 *     cdef object v_defnamespace = data.defnamespace.decode("utf-8") if data.defnamespace is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_defname = data.defname.decode("utf-8") if data.defname is not NULL else None
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 */
  if ((__pyx_v_data->defnamespace != NULL)) {
    __pyx_t_2 = __pyx_v_data->defnamespace;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_defnamespace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":316
 * cdef create_DefElem(structs.DefElem* data, offset_to_index):
 *     cdef object v_defnamespace = data.defnamespace.decode("utf-8") if data.defnamespace is not NULL else None
 *     cdef object v_defname = data.defname.decode("utf-8") if data.defname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_defaction = getattr(enums, 'DefElemAction')(data.defaction)
 */
  if ((__pyx_v_data->defname != NULL)) {
    __pyx_t_4 = __pyx_v_data->defname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_defname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":317
 *     cdef object v_defnamespace = data.defnamespace.decode("utf-8") if data.defnamespace is not NULL else None
 *     cdef object v_defname = data.defname.decode("utf-8") if data.defname is not NULL else None
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_defaction = getattr(enums, 'DefElemAction')(data.defaction)
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":318
 *     cdef object v_defname = data.defname.decode("utf-8") if data.defname is not NULL else None
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_defaction = getattr(enums, 'DefElemAction')(data.defaction)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.DefElem(v_defnamespace, v_defname, v_arg, v_defaction, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_DefElemAction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_DefElemAction(__pyx_v_data->defaction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_defaction = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":319
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_defaction = getattr(enums, 'DefElemAction')(data.defaction)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.DefElem(v_defnamespace, v_defname, v_arg, v_defaction, v_location)
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":320
 *     cdef object v_defaction = getattr(enums, 'DefElemAction')(data.defaction)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.DefElem(v_defnamespace, v_defname, v_arg, v_defaction, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DefElem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_defnamespace, __pyx_v_v_defname, __pyx_v_v_arg, __pyx_v_v_defaction, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 5+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":314
 * 
 * 
 * cdef create_DefElem(structs.DefElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_defnamespace = data.defnamespace.decode("utf-8") if data.defnamespace is not NULL else None
 *     cdef object v_defname = data.defname.decode("utf-8") if data.defname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_DefElem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_defnamespace);
  __Pyx_XDECREF(__pyx_v_v_defname);
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_defaction);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":323
 * 
 * 
 * cdef create_LockingClause(structs.LockingClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_lockedRels = _pg_list_to_tuple(data.lockedRels, offset_to_index)
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 */

static PyObject *__pyx_f_6pglast_6parser_create_LockingClause(LockingClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_lockedRels = 0;
  PyObject *__pyx_v_v_strength = 0;
  PyObject *__pyx_v_v_waitPolicy = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_LockingClause", 0);

  /* "pglast/ast.pyx":324
 * 
 * cdef create_LockingClause(structs.LockingClause* data, offset_to_index):
 *     cdef tuple v_lockedRels = _pg_list_to_tuple(data.lockedRels, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->lockedRels, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 324, __pyx_L1_error)
  __pyx_v_v_lockedRels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":325
 * cdef create_LockingClause(structs.LockingClause* data, offset_to_index):
 *     cdef tuple v_lockedRels = _pg_list_to_tuple(data.lockedRels, offset_to_index)
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)             # <<<<<<<<<<<<<<
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)
 *     return ast.LockingClause(v_lockedRels, v_strength, v_waitPolicy)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_LockClauseStrength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_LockClauseStrength(__pyx_v_data->strength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_strength = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":326
 *     cdef tuple v_lockedRels = _pg_list_to_tuple(data.lockedRels, offset_to_index)
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)             # <<<<<<<<<<<<<<
 *     return ast.LockingClause(v_lockedRels, v_strength, v_waitPolicy)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_LockWaitPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_LockWaitPolicy(__pyx_v_data->waitPolicy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_waitPolicy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":327
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)
 *     return ast.LockingClause(v_lockedRels, v_strength, v_waitPolicy)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LockingClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_lockedRels, __pyx_v_v_strength, __pyx_v_v_waitPolicy};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __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;

  /* "pglast/ast.pyx":323
 * 
 * 
 * cdef create_LockingClause(structs.LockingClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_lockedRels = _pg_list_to_tuple(data.lockedRels, offset_to_index)
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_LockingClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_lockedRels);
  __Pyx_XDECREF(__pyx_v_v_strength);
  __Pyx_XDECREF(__pyx_v_v_waitPolicy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":330
 * 
 * 
 * cdef create_XmlSerialize(structs.XmlSerialize* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_XmlSerialize(XmlSerialize *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_xmloption = 0;
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_XmlSerialize", 0);

  /* "pglast/ast.pyx":331
 * 
 * cdef create_XmlSerialize(structs.XmlSerialize* data, offset_to_index):
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_XmlOptionType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_XmlOptionType(__pyx_v_data->xmloption); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_xmloption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":332
 * cdef create_XmlSerialize(structs.XmlSerialize* data, offset_to_index):
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->expr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":333
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.XmlSerialize(v_xmloption, v_expr, v_typeName, v_location)
 */
  if ((__pyx_v_data->typeName != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_typeName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":334
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.XmlSerialize(v_xmloption, v_expr, v_typeName, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":335
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.XmlSerialize(v_xmloption, v_expr, v_typeName, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_XmlSerialize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_xmloption, __pyx_v_v_expr, __pyx_v_v_typeName, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __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;

  /* "pglast/ast.pyx":330
 * 
 * 
 * cdef create_XmlSerialize(structs.XmlSerialize* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_XmlSerialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_xmloption);
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":338
 * 
 * 
 * cdef create_PartitionElem(structs.PartitionElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_PartitionElem(PartitionElem *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_collation = 0;
  PyObject *__pyx_v_v_opclass = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PartitionElem", 0);

  /* "pglast/ast.pyx":339
 * 
 * cdef create_PartitionElem(structs.PartitionElem* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":340
 * cdef create_PartitionElem(structs.PartitionElem* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 */
  if ((__pyx_v_data->expr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":341
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->collation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 341, __pyx_L1_error)
  __pyx_v_v_collation = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":342
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionElem(v_name, v_expr, v_collation, v_opclass, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opclass, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 342, __pyx_L1_error)
  __pyx_v_v_opclass = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":343
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.PartitionElem(v_name, v_expr, v_collation, v_opclass, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":344
 *     cdef tuple v_opclass = _pg_list_to_tuple(data.opclass, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionElem(v_name, v_expr, v_collation, v_opclass, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PartitionElem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_v_name, __pyx_v_v_expr, __pyx_v_v_collation, __pyx_v_v_opclass, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 5+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __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;

  /* "pglast/ast.pyx":338
 * 
 * 
 * cdef create_PartitionElem(structs.PartitionElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_PartitionElem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_collation);
  __Pyx_XDECREF(__pyx_v_v_opclass);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":347
 * 
 * 
 * cdef create_PartitionSpec(structs.PartitionSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_strategy = data.strategy.decode("utf-8") if data.strategy is not NULL else None
 *     cdef tuple v_partParams = _pg_list_to_tuple(data.partParams, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_PartitionSpec(PartitionSpec *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_strategy = 0;
  PyObject *__pyx_v_v_partParams = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PartitionSpec", 0);

  /* "pglast/ast.pyx":348
 * 
 * cdef create_PartitionSpec(structs.PartitionSpec* data, offset_to_index):
 *     cdef object v_strategy = data.strategy.decode("utf-8") if data.strategy is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_partParams = _pg_list_to_tuple(data.partParams, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->strategy != NULL)) {
    __pyx_t_2 = __pyx_v_data->strategy;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_strategy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":349
 * cdef create_PartitionSpec(structs.PartitionSpec* data, offset_to_index):
 *     cdef object v_strategy = data.strategy.decode("utf-8") if data.strategy is not NULL else None
 *     cdef tuple v_partParams = _pg_list_to_tuple(data.partParams, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionSpec(v_strategy, v_partParams, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->partParams, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 349, __pyx_L1_error)
  __pyx_v_v_partParams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":350
 *     cdef object v_strategy = data.strategy.decode("utf-8") if data.strategy is not NULL else None
 *     cdef tuple v_partParams = _pg_list_to_tuple(data.partParams, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.PartitionSpec(v_strategy, v_partParams, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":351
 *     cdef tuple v_partParams = _pg_list_to_tuple(data.partParams, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionSpec(v_strategy, v_partParams, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PartitionSpec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_strategy, __pyx_v_v_partParams, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __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;

  /* "pglast/ast.pyx":347
 * 
 * 
 * cdef create_PartitionSpec(structs.PartitionSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_strategy = data.strategy.decode("utf-8") if data.strategy is not NULL else None
 *     cdef tuple v_partParams = _pg_list_to_tuple(data.partParams, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_PartitionSpec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_strategy);
  __Pyx_XDECREF(__pyx_v_v_partParams);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":354
 * 
 * 
 * cdef create_PartitionBoundSpec(structs.PartitionBoundSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_strategy = chr(data.strategy)
 *     cdef object v_is_default = bool(data.is_default)
 */

static PyObject *__pyx_f_6pglast_6parser_create_PartitionBoundSpec(PartitionBoundSpec *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_strategy = 0;
  PyObject *__pyx_v_v_is_default = 0;
  PyObject *__pyx_v_v_modulus = 0;
  PyObject *__pyx_v_v_remainder = 0;
  PyObject *__pyx_v_v_listdatums = 0;
  PyObject *__pyx_v_v_lowerdatums = 0;
  PyObject *__pyx_v_v_upperdatums = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PartitionBoundSpec", 0);

  /* "pglast/ast.pyx":355
 * 
 * cdef create_PartitionBoundSpec(structs.PartitionBoundSpec* data, offset_to_index):
 *     cdef object v_strategy = chr(data.strategy)             # <<<<<<<<<<<<<<
 *     cdef object v_is_default = bool(data.is_default)
 *     cdef object v_modulus = data.modulus
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->strategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_strategy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":356
 * cdef create_PartitionBoundSpec(structs.PartitionBoundSpec* data, offset_to_index):
 *     cdef object v_strategy = chr(data.strategy)
 *     cdef object v_is_default = bool(data.is_default)             # <<<<<<<<<<<<<<
 *     cdef object v_modulus = data.modulus
 *     cdef object v_remainder = data.remainder
 */
  __pyx_t_2 = __Pyx_PyInt_From_bool(__pyx_v_data->is_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_is_default = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":357
 *     cdef object v_strategy = chr(data.strategy)
 *     cdef object v_is_default = bool(data.is_default)
 *     cdef object v_modulus = data.modulus             # <<<<<<<<<<<<<<
 *     cdef object v_remainder = data.remainder
 *     cdef tuple v_listdatums = _pg_list_to_tuple(data.listdatums, offset_to_index)
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->modulus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_modulus = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":358
 *     cdef object v_is_default = bool(data.is_default)
 *     cdef object v_modulus = data.modulus
 *     cdef object v_remainder = data.remainder             # <<<<<<<<<<<<<<
 *     cdef tuple v_listdatums = _pg_list_to_tuple(data.listdatums, offset_to_index)
 *     cdef tuple v_lowerdatums = _pg_list_to_tuple(data.lowerdatums, offset_to_index)
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->remainder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_remainder = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":359
 *     cdef object v_modulus = data.modulus
 *     cdef object v_remainder = data.remainder
 *     cdef tuple v_listdatums = _pg_list_to_tuple(data.listdatums, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_lowerdatums = _pg_list_to_tuple(data.lowerdatums, offset_to_index)
 *     cdef tuple v_upperdatums = _pg_list_to_tuple(data.upperdatums, offset_to_index)
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->listdatums, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 359, __pyx_L1_error)
  __pyx_v_v_listdatums = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":360
 *     cdef object v_remainder = data.remainder
 *     cdef tuple v_listdatums = _pg_list_to_tuple(data.listdatums, offset_to_index)
 *     cdef tuple v_lowerdatums = _pg_list_to_tuple(data.lowerdatums, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_upperdatums = _pg_list_to_tuple(data.upperdatums, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->lowerdatums, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 360, __pyx_L1_error)
  __pyx_v_v_lowerdatums = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":361
 *     cdef tuple v_listdatums = _pg_list_to_tuple(data.listdatums, offset_to_index)
 *     cdef tuple v_lowerdatums = _pg_list_to_tuple(data.lowerdatums, offset_to_index)
 *     cdef tuple v_upperdatums = _pg_list_to_tuple(data.upperdatums, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionBoundSpec(v_strategy, v_is_default, v_modulus, v_remainder, v_listdatums, v_lowerdatums, v_upperdatums, v_location)
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->upperdatums, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 361, __pyx_L1_error)
  __pyx_v_v_upperdatums = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":362
 *     cdef tuple v_lowerdatums = _pg_list_to_tuple(data.lowerdatums, offset_to_index)
 *     cdef tuple v_upperdatums = _pg_list_to_tuple(data.upperdatums, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.PartitionBoundSpec(v_strategy, v_is_default, v_modulus, v_remainder, v_listdatums, v_lowerdatums, v_upperdatums, v_location)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":363
 *     cdef tuple v_upperdatums = _pg_list_to_tuple(data.upperdatums, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionBoundSpec(v_strategy, v_is_default, v_modulus, v_remainder, v_listdatums, v_lowerdatums, v_upperdatums, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PartitionBoundSpec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_4, __pyx_v_v_strategy, __pyx_v_v_is_default, __pyx_v_v_modulus, __pyx_v_v_remainder, __pyx_v_v_listdatums, __pyx_v_v_lowerdatums, __pyx_v_v_upperdatums, __pyx_v_v_location};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 8+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __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;

  /* "pglast/ast.pyx":354
 * 
 * 
 * cdef create_PartitionBoundSpec(structs.PartitionBoundSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_strategy = chr(data.strategy)
 *     cdef object v_is_default = bool(data.is_default)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_PartitionBoundSpec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_strategy);
  __Pyx_XDECREF(__pyx_v_v_is_default);
  __Pyx_XDECREF(__pyx_v_v_modulus);
  __Pyx_XDECREF(__pyx_v_v_remainder);
  __Pyx_XDECREF(__pyx_v_v_listdatums);
  __Pyx_XDECREF(__pyx_v_v_lowerdatums);
  __Pyx_XDECREF(__pyx_v_v_upperdatums);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":366
 * 
 * 
 * cdef create_PartitionRangeDatum(structs.PartitionRangeDatum* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'PartitionRangeDatumKind')(data.kind)
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_PartitionRangeDatum(PartitionRangeDatum *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_value = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PartitionRangeDatum", 0);

  /* "pglast/ast.pyx":367
 * 
 * cdef create_PartitionRangeDatum(structs.PartitionRangeDatum* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'PartitionRangeDatumKind')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_PartitionRangeDatumKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_PartitionRangeDatumKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":368
 * cdef create_PartitionRangeDatum(structs.PartitionRangeDatum* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'PartitionRangeDatumKind')(data.kind)
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionRangeDatum(v_kind, v_value, v_location)
 */
  if ((__pyx_v_data->value != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->value, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":369
 *     cdef object v_kind = getattr(enums, 'PartitionRangeDatumKind')(data.kind)
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.PartitionRangeDatum(v_kind, v_value, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":370
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PartitionRangeDatum(v_kind, v_value, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PartitionRangeDatum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_kind, __pyx_v_v_value, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __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;

  /* "pglast/ast.pyx":366
 * 
 * 
 * cdef create_PartitionRangeDatum(structs.PartitionRangeDatum* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'PartitionRangeDatumKind')(data.kind)
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_PartitionRangeDatum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_value);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":373
 * 
 * 
 * cdef create_PartitionCmd(structs.PartitionCmd* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 *     cdef object v_bound = create(data.bound, offset_to_index) if data.bound is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_PartitionCmd(PartitionCmd *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_bound = 0;
  PyObject *__pyx_v_v_concurrent = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PartitionCmd", 0);

  /* "pglast/ast.pyx":374
 * 
 * cdef create_PartitionCmd(structs.PartitionCmd* data, offset_to_index):
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_bound = create(data.bound, offset_to_index) if data.bound is not NULL else None
 *     cdef object v_concurrent = bool(data.concurrent)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":375
 * cdef create_PartitionCmd(structs.PartitionCmd* data, offset_to_index):
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 *     cdef object v_bound = create(data.bound, offset_to_index) if data.bound is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_concurrent = bool(data.concurrent)
 *     return ast.PartitionCmd(v_name, v_bound, v_concurrent)
 */
  if ((__pyx_v_data->bound != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->bound, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_bound = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":376
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 *     cdef object v_bound = create(data.bound, offset_to_index) if data.bound is not NULL else None
 *     cdef object v_concurrent = bool(data.concurrent)             # <<<<<<<<<<<<<<
 *     return ast.PartitionCmd(v_name, v_bound, v_concurrent)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->concurrent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_concurrent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":377
 *     cdef object v_bound = create(data.bound, offset_to_index) if data.bound is not NULL else None
 *     cdef object v_concurrent = bool(data.concurrent)
 *     return ast.PartitionCmd(v_name, v_bound, v_concurrent)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PartitionCmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_name, __pyx_v_v_bound, __pyx_v_v_concurrent};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":373
 * 
 * 
 * cdef create_PartitionCmd(structs.PartitionCmd* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 *     cdef object v_bound = create(data.bound, offset_to_index) if data.bound is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_PartitionCmd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_bound);
  __Pyx_XDECREF(__pyx_v_v_concurrent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":380
 * 
 * 
 * cdef create_RangeTblEntry(structs.RangeTblEntry* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
 *     cdef object v_relkind = chr(data.relkind)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeTblEntry(RangeTblEntry *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_rtekind = 0;
  PyObject *__pyx_v_v_relkind = 0;
  PyObject *__pyx_v_v_rellockmode = 0;
  PyObject *__pyx_v_v_tablesample = 0;
  PyObject *__pyx_v_v_subquery = 0;
  PyObject *__pyx_v_v_security_barrier = 0;
  PyObject *__pyx_v_v_jointype = 0;
  PyObject *__pyx_v_v_joinmergedcols = 0;
  PyObject *__pyx_v_v_joinaliasvars = 0;
  PyObject *__pyx_v_v_joinleftcols = 0;
  PyObject *__pyx_v_v_joinrightcols = 0;
  PyObject *__pyx_v_v_join_using_alias = 0;
  PyObject *__pyx_v_v_functions = 0;
  PyObject *__pyx_v_v_funcordinality = 0;
  PyObject *__pyx_v_v_tablefunc = 0;
  PyObject *__pyx_v_v_values_lists = 0;
  PyObject *__pyx_v_v_ctename = 0;
  PyObject *__pyx_v_v_ctelevelsup = 0;
  PyObject *__pyx_v_v_self_reference = 0;
  PyObject *__pyx_v_v_coltypes = 0;
  PyObject *__pyx_v_v_coltypmods = 0;
  PyObject *__pyx_v_v_colcollations = 0;
  PyObject *__pyx_v_v_enrname = 0;
  PyObject *__pyx_v_v_enrtuples = 0;
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_v_v_eref = 0;
  PyObject *__pyx_v_v_lateral = 0;
  PyObject *__pyx_v_v_inh = 0;
  PyObject *__pyx_v_v_inFromCl = 0;
  PyObject *__pyx_v_v_requiredPerms = 0;
  PyObject *__pyx_v_v_selectedCols = 0;
  PyObject *__pyx_v_v_insertedCols = 0;
  PyObject *__pyx_v_v_updatedCols = 0;
  PyObject *__pyx_v_v_extraUpdatedCols = 0;
  PyObject *__pyx_v_v_securityQuals = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTblEntry", 0);

  /* "pglast/ast.pyx":381
 * 
 * cdef create_RangeTblEntry(structs.RangeTblEntry* data, offset_to_index):
 *     cdef object v_rtekind = getattr(enums, 'RTEKind')(data.rtekind)             # <<<<<<<<<<<<<<
 *     cdef object v_relkind = chr(data.relkind)
 *     cdef object v_rellockmode = data.rellockmode
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_RTEKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_RTEKind(__pyx_v_data->rtekind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_rtekind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":382
 * cdef create_RangeTblEntry(structs.RangeTblEntry* data, offset_to_index):
 *     cdef object v_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
 *     cdef object v_relkind = chr(data.relkind)             # <<<<<<<<<<<<<<
 *     cdef object v_rellockmode = data.rellockmode
 *     cdef object v_tablesample = create(data.tablesample, offset_to_index) if data.tablesample is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->relkind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_relkind = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":383
 *     cdef object v_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
 *     cdef object v_relkind = chr(data.relkind)
 *     cdef object v_rellockmode = data.rellockmode             # <<<<<<<<<<<<<<
 *     cdef object v_tablesample = create(data.tablesample, offset_to_index) if data.tablesample is not NULL else None
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->rellockmode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_rellockmode = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":384
 *     cdef object v_relkind = chr(data.relkind)
 *     cdef object v_rellockmode = data.rellockmode
 *     cdef object v_tablesample = create(data.tablesample, offset_to_index) if data.tablesample is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 *     cdef object v_security_barrier = bool(data.security_barrier)
 */
  if ((__pyx_v_data->tablesample != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->tablesample, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_tablesample = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":385
 *     cdef object v_rellockmode = data.rellockmode
 *     cdef object v_tablesample = create(data.tablesample, offset_to_index) if data.tablesample is not NULL else None
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_security_barrier = bool(data.security_barrier)
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 */
  if ((__pyx_v_data->subquery != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->subquery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_subquery = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":386
 *     cdef object v_tablesample = create(data.tablesample, offset_to_index) if data.tablesample is not NULL else None
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 *     cdef object v_security_barrier = bool(data.security_barrier)             # <<<<<<<<<<<<<<
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 *     cdef object v_joinmergedcols = data.joinmergedcols
 */
  __pyx_t_3 = __Pyx_PyInt_From_bool(__pyx_v_data->security_barrier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_security_barrier = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":387
 *     cdef object v_subquery = create(data.subquery, offset_to_index) if data.subquery is not NULL else None
 *     cdef object v_security_barrier = bool(data.security_barrier)
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)             # <<<<<<<<<<<<<<
 *     cdef object v_joinmergedcols = data.joinmergedcols
 *     cdef tuple v_joinaliasvars = _pg_list_to_tuple(data.joinaliasvars, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_enums); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_n_u_JoinType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_JoinType(__pyx_v_data->jointype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_jointype = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":388
 *     cdef object v_security_barrier = bool(data.security_barrier)
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 *     cdef object v_joinmergedcols = data.joinmergedcols             # <<<<<<<<<<<<<<
 *     cdef tuple v_joinaliasvars = _pg_list_to_tuple(data.joinaliasvars, offset_to_index)
 *     cdef tuple v_joinleftcols = _pg_list_to_tuple(data.joinleftcols, offset_to_index)
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->joinmergedcols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_joinmergedcols = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":389
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 *     cdef object v_joinmergedcols = data.joinmergedcols
 *     cdef tuple v_joinaliasvars = _pg_list_to_tuple(data.joinaliasvars, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_joinleftcols = _pg_list_to_tuple(data.joinleftcols, offset_to_index)
 *     cdef tuple v_joinrightcols = _pg_list_to_tuple(data.joinrightcols, offset_to_index)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->joinaliasvars, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 389, __pyx_L1_error)
  __pyx_v_v_joinaliasvars = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":390
 *     cdef object v_joinmergedcols = data.joinmergedcols
 *     cdef tuple v_joinaliasvars = _pg_list_to_tuple(data.joinaliasvars, offset_to_index)
 *     cdef tuple v_joinleftcols = _pg_list_to_tuple(data.joinleftcols, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_joinrightcols = _pg_list_to_tuple(data.joinrightcols, offset_to_index)
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->joinleftcols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 390, __pyx_L1_error)
  __pyx_v_v_joinleftcols = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":391
 *     cdef tuple v_joinaliasvars = _pg_list_to_tuple(data.joinaliasvars, offset_to_index)
 *     cdef tuple v_joinleftcols = _pg_list_to_tuple(data.joinleftcols, offset_to_index)
 *     cdef tuple v_joinrightcols = _pg_list_to_tuple(data.joinrightcols, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->joinrightcols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 391, __pyx_L1_error)
  __pyx_v_v_joinrightcols = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":392
 *     cdef tuple v_joinleftcols = _pg_list_to_tuple(data.joinleftcols, offset_to_index)
 *     cdef tuple v_joinrightcols = _pg_list_to_tuple(data.joinrightcols, offset_to_index)
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 *     cdef object v_funcordinality = bool(data.funcordinality)
 */
  if ((__pyx_v_data->join_using_alias != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->join_using_alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_join_using_alias = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":393
 *     cdef tuple v_joinrightcols = _pg_list_to_tuple(data.joinrightcols, offset_to_index)
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_funcordinality = bool(data.funcordinality)
 *     cdef object v_tablefunc = create(data.tablefunc, offset_to_index) if data.tablefunc is not NULL else None
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->functions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 393, __pyx_L1_error)
  __pyx_v_v_functions = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":394
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 *     cdef object v_funcordinality = bool(data.funcordinality)             # <<<<<<<<<<<<<<
 *     cdef object v_tablefunc = create(data.tablefunc, offset_to_index) if data.tablefunc is not NULL else None
 *     cdef tuple v_values_lists = _pg_list_to_tuple(data.values_lists, offset_to_index)
 */
  __pyx_t_3 = __Pyx_PyInt_From_bool(__pyx_v_data->funcordinality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_funcordinality = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":395
 *     cdef tuple v_functions = _pg_list_to_tuple(data.functions, offset_to_index)
 *     cdef object v_funcordinality = bool(data.funcordinality)
 *     cdef object v_tablefunc = create(data.tablefunc, offset_to_index) if data.tablefunc is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_values_lists = _pg_list_to_tuple(data.values_lists, offset_to_index)
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 */
  if ((__pyx_v_data->tablefunc != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->tablefunc, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_tablefunc = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":396
 *     cdef object v_funcordinality = bool(data.funcordinality)
 *     cdef object v_tablefunc = create(data.tablefunc, offset_to_index) if data.tablefunc is not NULL else None
 *     cdef tuple v_values_lists = _pg_list_to_tuple(data.values_lists, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 *     cdef object v_ctelevelsup = data.ctelevelsup
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->values_lists, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 396, __pyx_L1_error)
  __pyx_v_v_values_lists = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":397
 *     cdef object v_tablefunc = create(data.tablefunc, offset_to_index) if data.tablefunc is not NULL else None
 *     cdef tuple v_values_lists = _pg_list_to_tuple(data.values_lists, offset_to_index)
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_ctelevelsup = data.ctelevelsup
 *     cdef object v_self_reference = bool(data.self_reference)
 */
  if ((__pyx_v_data->ctename != NULL)) {
    __pyx_t_7 = __pyx_v_data->ctename;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_ctename = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":398
 *     cdef tuple v_values_lists = _pg_list_to_tuple(data.values_lists, offset_to_index)
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 *     cdef object v_ctelevelsup = data.ctelevelsup             # <<<<<<<<<<<<<<
 *     cdef object v_self_reference = bool(data.self_reference)
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->ctelevelsup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_ctelevelsup = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":399
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 *     cdef object v_ctelevelsup = data.ctelevelsup
 *     cdef object v_self_reference = bool(data.self_reference)             # <<<<<<<<<<<<<<
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 */
  __pyx_t_3 = __Pyx_PyInt_From_bool(__pyx_v_data->self_reference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_self_reference = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":400
 *     cdef object v_ctelevelsup = data.ctelevelsup
 *     cdef object v_self_reference = bool(data.self_reference)
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->coltypes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 400, __pyx_L1_error)
  __pyx_v_v_coltypes = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":401
 *     cdef object v_self_reference = bool(data.self_reference)
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 *     cdef object v_enrname = data.enrname.decode("utf-8") if data.enrname is not NULL else None
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->coltypmods, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_v_v_coltypmods = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":402
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_enrname = data.enrname.decode("utf-8") if data.enrname is not NULL else None
 *     cdef object v_enrtuples = data.enrtuples
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colcollations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_v_v_colcollations = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":403
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 *     cdef object v_enrname = data.enrname.decode("utf-8") if data.enrname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_enrtuples = data.enrtuples
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 */
  if ((__pyx_v_data->enrname != NULL)) {
    __pyx_t_8 = __pyx_v_data->enrname;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_8, 0, strlen(__pyx_t_8), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_enrname = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":404
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 *     cdef object v_enrname = data.enrname.decode("utf-8") if data.enrname is not NULL else None
 *     cdef object v_enrtuples = data.enrtuples             # <<<<<<<<<<<<<<
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_eref = create(data.eref, offset_to_index) if data.eref is not NULL else None
 */
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_data->enrtuples); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_enrtuples = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":405
 *     cdef object v_enrname = data.enrname.decode("utf-8") if data.enrname is not NULL else None
 *     cdef object v_enrtuples = data.enrtuples
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_eref = create(data.eref, offset_to_index) if data.eref is not NULL else None
 *     cdef object v_lateral = bool(data.lateral)
 */
  if ((__pyx_v_data->alias != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_alias = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":406
 *     cdef object v_enrtuples = data.enrtuples
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_eref = create(data.eref, offset_to_index) if data.eref is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_inh = bool(data.inh)
 */
  if ((__pyx_v_data->eref != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->eref, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_eref = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":407
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_eref = create(data.eref, offset_to_index) if data.eref is not NULL else None
 *     cdef object v_lateral = bool(data.lateral)             # <<<<<<<<<<<<<<
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_inFromCl = bool(data.inFromCl)
 */
  __pyx_t_3 = __Pyx_PyInt_From_bool(__pyx_v_data->lateral); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_lateral = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":408
 *     cdef object v_eref = create(data.eref, offset_to_index) if data.eref is not NULL else None
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_inh = bool(data.inh)             # <<<<<<<<<<<<<<
 *     cdef object v_inFromCl = bool(data.inFromCl)
 *     cdef object v_requiredPerms = data.requiredPerms
 */
  __pyx_t_3 = __Pyx_PyInt_From_bool(__pyx_v_data->inh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_inh = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":409
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_inFromCl = bool(data.inFromCl)             # <<<<<<<<<<<<<<
 *     cdef object v_requiredPerms = data.requiredPerms
 *     cdef set v_selectedCols = _pg_bitmapset_to_set(data.selectedCols)
 */
  __pyx_t_3 = __Pyx_PyInt_From_bool(__pyx_v_data->inFromCl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_inFromCl = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":410
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_inFromCl = bool(data.inFromCl)
 *     cdef object v_requiredPerms = data.requiredPerms             # <<<<<<<<<<<<<<
 *     cdef set v_selectedCols = _pg_bitmapset_to_set(data.selectedCols)
 *     cdef set v_insertedCols = _pg_bitmapset_to_set(data.insertedCols)
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->requiredPerms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_v_requiredPerms = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":411
 *     cdef object v_inFromCl = bool(data.inFromCl)
 *     cdef object v_requiredPerms = data.requiredPerms
 *     cdef set v_selectedCols = _pg_bitmapset_to_set(data.selectedCols)             # <<<<<<<<<<<<<<
 *     cdef set v_insertedCols = _pg_bitmapset_to_set(data.insertedCols)
 *     cdef set v_updatedCols = _pg_bitmapset_to_set(data.updatedCols)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->selectedCols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PySet_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_3))) __PYX_ERR(0, 411, __pyx_L1_error)
  __pyx_v_v_selectedCols = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":412
 *     cdef object v_requiredPerms = data.requiredPerms
 *     cdef set v_selectedCols = _pg_bitmapset_to_set(data.selectedCols)
 *     cdef set v_insertedCols = _pg_bitmapset_to_set(data.insertedCols)             # <<<<<<<<<<<<<<
 *     cdef set v_updatedCols = _pg_bitmapset_to_set(data.updatedCols)
 *     cdef set v_extraUpdatedCols = _pg_bitmapset_to_set(data.extraUpdatedCols)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->insertedCols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PySet_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_3))) __PYX_ERR(0, 412, __pyx_L1_error)
  __pyx_v_v_insertedCols = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":413
 *     cdef set v_selectedCols = _pg_bitmapset_to_set(data.selectedCols)
 *     cdef set v_insertedCols = _pg_bitmapset_to_set(data.insertedCols)
 *     cdef set v_updatedCols = _pg_bitmapset_to_set(data.updatedCols)             # <<<<<<<<<<<<<<
 *     cdef set v_extraUpdatedCols = _pg_bitmapset_to_set(data.extraUpdatedCols)
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->updatedCols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PySet_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_3))) __PYX_ERR(0, 413, __pyx_L1_error)
  __pyx_v_v_updatedCols = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":414
 *     cdef set v_insertedCols = _pg_bitmapset_to_set(data.insertedCols)
 *     cdef set v_updatedCols = _pg_bitmapset_to_set(data.updatedCols)
 *     cdef set v_extraUpdatedCols = _pg_bitmapset_to_set(data.extraUpdatedCols)             # <<<<<<<<<<<<<<
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)
 *     return ast.RangeTblEntry(v_rtekind, v_relkind, v_rellockmode, v_tablesample, v_subquery, v_security_barrier, v_jointype, v_joinmergedcols, v_joinaliasvars, v_joinleftcols, v_joinrightcols, v_join_using_alias, v_functions, v_funcordinality, v_tablefunc, v_values_lists, v_ctename, v_ctelevelsup, v_self_reference, v_coltypes, v_coltypmods, v_colcollations, v_enrname, v_enrtuples, v_alias, v_eref, v_lateral, v_inh, v_inFromCl, v_requiredPerms, v_selectedCols, v_insertedCols, v_updatedCols, v_extraUpdatedCols, v_securityQuals)
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->extraUpdatedCols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PySet_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_3))) __PYX_ERR(0, 414, __pyx_L1_error)
  __pyx_v_v_extraUpdatedCols = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":415
 *     cdef set v_updatedCols = _pg_bitmapset_to_set(data.updatedCols)
 *     cdef set v_extraUpdatedCols = _pg_bitmapset_to_set(data.extraUpdatedCols)
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.RangeTblEntry(v_rtekind, v_relkind, v_rellockmode, v_tablesample, v_subquery, v_security_barrier, v_jointype, v_joinmergedcols, v_joinaliasvars, v_joinleftcols, v_joinrightcols, v_join_using_alias, v_functions, v_funcordinality, v_tablefunc, v_values_lists, v_ctename, v_ctelevelsup, v_self_reference, v_coltypes, v_coltypmods, v_colcollations, v_enrname, v_enrtuples, v_alias, v_eref, v_lateral, v_inh, v_inFromCl, v_requiredPerms, v_selectedCols, v_insertedCols, v_updatedCols, v_extraUpdatedCols, v_securityQuals)
 * 
 */
  __pyx_t_3 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->securityQuals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_3))) __PYX_ERR(0, 415, __pyx_L1_error)
  __pyx_v_v_securityQuals = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":416
 *     cdef set v_extraUpdatedCols = _pg_bitmapset_to_set(data.extraUpdatedCols)
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)
 *     return ast.RangeTblEntry(v_rtekind, v_relkind, v_rellockmode, v_tablesample, v_subquery, v_security_barrier, v_jointype, v_joinmergedcols, v_joinaliasvars, v_joinleftcols, v_joinrightcols, v_join_using_alias, v_functions, v_funcordinality, v_tablefunc, v_values_lists, v_ctename, v_ctelevelsup, v_self_reference, v_coltypes, v_coltypmods, v_colcollations, v_enrname, v_enrtuples, v_alias, v_eref, v_lateral, v_inh, v_inFromCl, v_requiredPerms, v_selectedCols, v_insertedCols, v_updatedCols, v_extraUpdatedCols, v_securityQuals)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RangeTblEntry); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[36] = {__pyx_t_2, __pyx_v_v_rtekind, __pyx_v_v_relkind, __pyx_v_v_rellockmode, __pyx_v_v_tablesample, __pyx_v_v_subquery, __pyx_v_v_security_barrier, __pyx_v_v_jointype, __pyx_v_v_joinmergedcols, __pyx_v_v_joinaliasvars, __pyx_v_v_joinleftcols, __pyx_v_v_joinrightcols, __pyx_v_v_join_using_alias, __pyx_v_v_functions, __pyx_v_v_funcordinality, __pyx_v_v_tablefunc, __pyx_v_v_values_lists, __pyx_v_v_ctename, __pyx_v_v_ctelevelsup, __pyx_v_v_self_reference, __pyx_v_v_coltypes, __pyx_v_v_coltypmods, __pyx_v_v_colcollations, __pyx_v_v_enrname, __pyx_v_v_enrtuples, __pyx_v_v_alias, __pyx_v_v_eref, __pyx_v_v_lateral, __pyx_v_v_inh, __pyx_v_v_inFromCl, __pyx_v_v_requiredPerms, __pyx_v_v_selectedCols, __pyx_v_v_insertedCols, __pyx_v_v_updatedCols, __pyx_v_v_extraUpdatedCols, __pyx_v_v_securityQuals};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 35+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":380
 * 
 * 
 * cdef create_RangeTblEntry(structs.RangeTblEntry* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
 *     cdef object v_relkind = chr(data.relkind)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RangeTblEntry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_rtekind);
  __Pyx_XDECREF(__pyx_v_v_relkind);
  __Pyx_XDECREF(__pyx_v_v_rellockmode);
  __Pyx_XDECREF(__pyx_v_v_tablesample);
  __Pyx_XDECREF(__pyx_v_v_subquery);
  __Pyx_XDECREF(__pyx_v_v_security_barrier);
  __Pyx_XDECREF(__pyx_v_v_jointype);
  __Pyx_XDECREF(__pyx_v_v_joinmergedcols);
  __Pyx_XDECREF(__pyx_v_v_joinaliasvars);
  __Pyx_XDECREF(__pyx_v_v_joinleftcols);
  __Pyx_XDECREF(__pyx_v_v_joinrightcols);
  __Pyx_XDECREF(__pyx_v_v_join_using_alias);
  __Pyx_XDECREF(__pyx_v_v_functions);
  __Pyx_XDECREF(__pyx_v_v_funcordinality);
  __Pyx_XDECREF(__pyx_v_v_tablefunc);
  __Pyx_XDECREF(__pyx_v_v_values_lists);
  __Pyx_XDECREF(__pyx_v_v_ctename);
  __Pyx_XDECREF(__pyx_v_v_ctelevelsup);
  __Pyx_XDECREF(__pyx_v_v_self_reference);
  __Pyx_XDECREF(__pyx_v_v_coltypes);
  __Pyx_XDECREF(__pyx_v_v_coltypmods);
  __Pyx_XDECREF(__pyx_v_v_colcollations);
  __Pyx_XDECREF(__pyx_v_v_enrname);
  __Pyx_XDECREF(__pyx_v_v_enrtuples);
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XDECREF(__pyx_v_v_eref);
  __Pyx_XDECREF(__pyx_v_v_lateral);
  __Pyx_XDECREF(__pyx_v_v_inh);
  __Pyx_XDECREF(__pyx_v_v_inFromCl);
  __Pyx_XDECREF(__pyx_v_v_requiredPerms);
  __Pyx_XDECREF(__pyx_v_v_selectedCols);
  __Pyx_XDECREF(__pyx_v_v_insertedCols);
  __Pyx_XDECREF(__pyx_v_v_updatedCols);
  __Pyx_XDECREF(__pyx_v_v_extraUpdatedCols);
  __Pyx_XDECREF(__pyx_v_v_securityQuals);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":419
 * 
 * 
 * cdef create_RangeTblFunction(structs.RangeTblFunction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 *     cdef object v_funccolcount = data.funccolcount
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeTblFunction(RangeTblFunction *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_funcexpr = 0;
  PyObject *__pyx_v_v_funccolcount = 0;
  PyObject *__pyx_v_v_funccolnames = 0;
  PyObject *__pyx_v_v_funccoltypes = 0;
  PyObject *__pyx_v_v_funccoltypmods = 0;
  PyObject *__pyx_v_v_funccolcollations = 0;
  PyObject *__pyx_v_v_funcparams = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTblFunction", 0);

  /* "pglast/ast.pyx":420
 * 
 * cdef create_RangeTblFunction(structs.RangeTblFunction* data, offset_to_index):
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_funccolcount = data.funccolcount
 *     cdef tuple v_funccolnames = _pg_list_to_tuple(data.funccolnames, offset_to_index)
 */
  if ((__pyx_v_data->funcexpr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->funcexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_funcexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":421
 * cdef create_RangeTblFunction(structs.RangeTblFunction* data, offset_to_index):
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 *     cdef object v_funccolcount = data.funccolcount             # <<<<<<<<<<<<<<
 *     cdef tuple v_funccolnames = _pg_list_to_tuple(data.funccolnames, offset_to_index)
 *     cdef tuple v_funccoltypes = _pg_list_to_tuple(data.funccoltypes, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->funccolcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_funccolcount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":422
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 *     cdef object v_funccolcount = data.funccolcount
 *     cdef tuple v_funccolnames = _pg_list_to_tuple(data.funccolnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_funccoltypes = _pg_list_to_tuple(data.funccoltypes, offset_to_index)
 *     cdef tuple v_funccoltypmods = _pg_list_to_tuple(data.funccoltypmods, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funccolnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 422, __pyx_L1_error)
  __pyx_v_v_funccolnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":423
 *     cdef object v_funccolcount = data.funccolcount
 *     cdef tuple v_funccolnames = _pg_list_to_tuple(data.funccolnames, offset_to_index)
 *     cdef tuple v_funccoltypes = _pg_list_to_tuple(data.funccoltypes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_funccoltypmods = _pg_list_to_tuple(data.funccoltypmods, offset_to_index)
 *     cdef tuple v_funccolcollations = _pg_list_to_tuple(data.funccolcollations, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funccoltypes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 423, __pyx_L1_error)
  __pyx_v_v_funccoltypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":424
 *     cdef tuple v_funccolnames = _pg_list_to_tuple(data.funccolnames, offset_to_index)
 *     cdef tuple v_funccoltypes = _pg_list_to_tuple(data.funccoltypes, offset_to_index)
 *     cdef tuple v_funccoltypmods = _pg_list_to_tuple(data.funccoltypmods, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_funccolcollations = _pg_list_to_tuple(data.funccolcollations, offset_to_index)
 *     cdef set v_funcparams = _pg_bitmapset_to_set(data.funcparams)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funccoltypmods, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 424, __pyx_L1_error)
  __pyx_v_v_funccoltypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":425
 *     cdef tuple v_funccoltypes = _pg_list_to_tuple(data.funccoltypes, offset_to_index)
 *     cdef tuple v_funccoltypmods = _pg_list_to_tuple(data.funccoltypmods, offset_to_index)
 *     cdef tuple v_funccolcollations = _pg_list_to_tuple(data.funccolcollations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef set v_funcparams = _pg_bitmapset_to_set(data.funcparams)
 *     return ast.RangeTblFunction(v_funcexpr, v_funccolcount, v_funccolnames, v_funccoltypes, v_funccoltypmods, v_funccolcollations, v_funcparams)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funccolcollations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 425, __pyx_L1_error)
  __pyx_v_v_funccolcollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":426
 *     cdef tuple v_funccoltypmods = _pg_list_to_tuple(data.funccoltypmods, offset_to_index)
 *     cdef tuple v_funccolcollations = _pg_list_to_tuple(data.funccolcollations, offset_to_index)
 *     cdef set v_funcparams = _pg_bitmapset_to_set(data.funcparams)             # <<<<<<<<<<<<<<
 *     return ast.RangeTblFunction(v_funcexpr, v_funccolcount, v_funccolnames, v_funccoltypes, v_funccoltypmods, v_funccolcollations, v_funcparams)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->funcparams); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(0, 426, __pyx_L1_error)
  __pyx_v_v_funcparams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":427
 *     cdef tuple v_funccolcollations = _pg_list_to_tuple(data.funccolcollations, offset_to_index)
 *     cdef set v_funcparams = _pg_bitmapset_to_set(data.funcparams)
 *     return ast.RangeTblFunction(v_funcexpr, v_funccolcount, v_funccolnames, v_funccoltypes, v_funccoltypmods, v_funccolcollations, v_funcparams)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RangeTblFunction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_2, __pyx_v_v_funcexpr, __pyx_v_v_funccolcount, __pyx_v_v_funccolnames, __pyx_v_v_funccoltypes, __pyx_v_v_funccoltypmods, __pyx_v_v_funccolcollations, __pyx_v_v_funcparams};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 7+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __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;

  /* "pglast/ast.pyx":419
 * 
 * 
 * cdef create_RangeTblFunction(structs.RangeTblFunction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 *     cdef object v_funccolcount = data.funccolcount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_RangeTblFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_funcexpr);
  __Pyx_XDECREF(__pyx_v_v_funccolcount);
  __Pyx_XDECREF(__pyx_v_v_funccolnames);
  __Pyx_XDECREF(__pyx_v_v_funccoltypes);
  __Pyx_XDECREF(__pyx_v_v_funccoltypmods);
  __Pyx_XDECREF(__pyx_v_v_funccolcollations);
  __Pyx_XDECREF(__pyx_v_v_funcparams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":430
 * 
 * 
 * cdef create_TableSampleClause(structs.TableSampleClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_TableSampleClause(TableSampleClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_repeatable = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TableSampleClause", 0);

  /* "pglast/ast.pyx":431
 * 
 * cdef create_TableSampleClause(structs.TableSampleClause* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 *     return ast.TableSampleClause(v_args, v_repeatable)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 431, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":432
 * cdef create_TableSampleClause(structs.TableSampleClause* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.TableSampleClause(v_args, v_repeatable)
 * 
 */
  if ((__pyx_v_data->repeatable != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->repeatable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_repeatable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":433
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 *     return ast.TableSampleClause(v_args, v_repeatable)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TableSampleClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_args, __pyx_v_v_repeatable};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __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;

  /* "pglast/ast.pyx":430
 * 
 * 
 * cdef create_TableSampleClause(structs.TableSampleClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_repeatable = create(data.repeatable, offset_to_index) if data.repeatable is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_TableSampleClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_repeatable);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":436
 * 
 * 
 * cdef create_WithCheckOption(structs.WithCheckOption* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'WCOKind')(data.kind)
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_WithCheckOption(WithCheckOption *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_relname = 0;
  PyObject *__pyx_v_v_polname = 0;
  PyObject *__pyx_v_v_qual = 0;
  PyObject *__pyx_v_v_cascaded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WithCheckOption", 0);

  /* "pglast/ast.pyx":437
 * 
 * cdef create_WithCheckOption(structs.WithCheckOption* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'WCOKind')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 *     cdef object v_polname = data.polname.decode("utf-8") if data.polname is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_WCOKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_WCOKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":438
 * cdef create_WithCheckOption(structs.WithCheckOption* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'WCOKind')(data.kind)
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_polname = data.polname.decode("utf-8") if data.polname is not NULL else None
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 */
  if ((__pyx_v_data->relname != NULL)) {
    __pyx_t_6 = __pyx_v_data->relname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":439
 *     cdef object v_kind = getattr(enums, 'WCOKind')(data.kind)
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 *     cdef object v_polname = data.polname.decode("utf-8") if data.polname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_cascaded = bool(data.cascaded)
 */
  if ((__pyx_v_data->polname != NULL)) {
    __pyx_t_7 = __pyx_v_data->polname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_polname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":440
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 *     cdef object v_polname = data.polname.decode("utf-8") if data.polname is not NULL else None
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cascaded = bool(data.cascaded)
 *     return ast.WithCheckOption(v_kind, v_relname, v_polname, v_qual, v_cascaded)
 */
  if ((__pyx_v_data->qual != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_qual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":441
 *     cdef object v_polname = data.polname.decode("utf-8") if data.polname is not NULL else None
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_cascaded = bool(data.cascaded)             # <<<<<<<<<<<<<<
 *     return ast.WithCheckOption(v_kind, v_relname, v_polname, v_qual, v_cascaded)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->cascaded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cascaded = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":442
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_cascaded = bool(data.cascaded)
 *     return ast.WithCheckOption(v_kind, v_relname, v_polname, v_qual, v_cascaded)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WithCheckOption); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_relname, __pyx_v_v_polname, __pyx_v_v_qual, __pyx_v_v_cascaded};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __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;

  /* "pglast/ast.pyx":436
 * 
 * 
 * cdef create_WithCheckOption(structs.WithCheckOption* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'WCOKind')(data.kind)
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_WithCheckOption", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_relname);
  __Pyx_XDECREF(__pyx_v_v_polname);
  __Pyx_XDECREF(__pyx_v_v_qual);
  __Pyx_XDECREF(__pyx_v_v_cascaded);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":445
 * 
 * 
 * cdef create_SortGroupClause(structs.SortGroupClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tleSortGroupRef = data.tleSortGroupRef
 *     cdef object v_nulls_first = bool(data.nulls_first)
 */

static PyObject *__pyx_f_6pglast_6parser_create_SortGroupClause(SortGroupClause *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_tleSortGroupRef = 0;
  PyObject *__pyx_v_v_nulls_first = 0;
  PyObject *__pyx_v_v_hashable = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SortGroupClause", 0);

  /* "pglast/ast.pyx":446
 * 
 * cdef create_SortGroupClause(structs.SortGroupClause* data, offset_to_index):
 *     cdef object v_tleSortGroupRef = data.tleSortGroupRef             # <<<<<<<<<<<<<<
 *     cdef object v_nulls_first = bool(data.nulls_first)
 *     cdef object v_hashable = bool(data.hashable)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->tleSortGroupRef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_tleSortGroupRef = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":447
 * cdef create_SortGroupClause(structs.SortGroupClause* data, offset_to_index):
 *     cdef object v_tleSortGroupRef = data.tleSortGroupRef
 *     cdef object v_nulls_first = bool(data.nulls_first)             # <<<<<<<<<<<<<<
 *     cdef object v_hashable = bool(data.hashable)
 *     return ast.SortGroupClause(v_tleSortGroupRef, v_nulls_first, v_hashable)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->nulls_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nulls_first = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":448
 *     cdef object v_tleSortGroupRef = data.tleSortGroupRef
 *     cdef object v_nulls_first = bool(data.nulls_first)
 *     cdef object v_hashable = bool(data.hashable)             # <<<<<<<<<<<<<<
 *     return ast.SortGroupClause(v_tleSortGroupRef, v_nulls_first, v_hashable)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->hashable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hashable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":449
 *     cdef object v_nulls_first = bool(data.nulls_first)
 *     cdef object v_hashable = bool(data.hashable)
 *     return ast.SortGroupClause(v_tleSortGroupRef, v_nulls_first, v_hashable)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SortGroupClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_tleSortGroupRef, __pyx_v_v_nulls_first, __pyx_v_v_hashable};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":445
 * 
 * 
 * cdef create_SortGroupClause(structs.SortGroupClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tleSortGroupRef = data.tleSortGroupRef
 *     cdef object v_nulls_first = bool(data.nulls_first)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SortGroupClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_tleSortGroupRef);
  __Pyx_XDECREF(__pyx_v_v_nulls_first);
  __Pyx_XDECREF(__pyx_v_v_hashable);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":452
 * 
 * 
 * cdef create_GroupingSet(structs.GroupingSet* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'GroupingSetKind')(data.kind)
 *     cdef tuple v_content = _pg_list_to_tuple(data.content, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_GroupingSet(GroupingSet *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_content = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_GroupingSet", 0);

  /* "pglast/ast.pyx":453
 * 
 * cdef create_GroupingSet(structs.GroupingSet* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'GroupingSetKind')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef tuple v_content = _pg_list_to_tuple(data.content, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_GroupingSetKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_GroupingSetKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":454
 * cdef create_GroupingSet(structs.GroupingSet* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'GroupingSetKind')(data.kind)
 *     cdef tuple v_content = _pg_list_to_tuple(data.content, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.GroupingSet(v_kind, v_content, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->content, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 454, __pyx_L1_error)
  __pyx_v_v_content = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":455
 *     cdef object v_kind = getattr(enums, 'GroupingSetKind')(data.kind)
 *     cdef tuple v_content = _pg_list_to_tuple(data.content, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.GroupingSet(v_kind, v_content, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":456
 *     cdef tuple v_content = _pg_list_to_tuple(data.content, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.GroupingSet(v_kind, v_content, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GroupingSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_kind, __pyx_v_v_content, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __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;

  /* "pglast/ast.pyx":452
 * 
 * 
 * cdef create_GroupingSet(structs.GroupingSet* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'GroupingSetKind')(data.kind)
 *     cdef tuple v_content = _pg_list_to_tuple(data.content, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_GroupingSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_content);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":459
 * 
 * 
 * cdef create_WindowClause(structs.WindowClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_WindowClause(WindowClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_refname = 0;
  PyObject *__pyx_v_v_partitionClause = 0;
  PyObject *__pyx_v_v_orderClause = 0;
  PyObject *__pyx_v_v_frameOptions = 0;
  PyObject *__pyx_v_v_startOffset = 0;
  PyObject *__pyx_v_v_endOffset = 0;
  PyObject *__pyx_v_v_runCondition = 0;
  PyObject *__pyx_v_v_inRangeAsc = 0;
  PyObject *__pyx_v_v_inRangeNullsFirst = 0;
  PyObject *__pyx_v_v_winref = 0;
  PyObject *__pyx_v_v_copiedOrder = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WindowClause", 0);

  /* "pglast/ast.pyx":460
 * 
 * cdef create_WindowClause(structs.WindowClause* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":461
 * cdef create_WindowClause(structs.WindowClause* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 */
  if ((__pyx_v_data->refname != NULL)) {
    __pyx_t_4 = __pyx_v_data->refname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_refname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":462
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 *     cdef object v_frameOptions = data.frameOptions
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->partitionClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 462, __pyx_L1_error)
  __pyx_v_v_partitionClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":463
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_frameOptions = data.frameOptions
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->orderClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 463, __pyx_L1_error)
  __pyx_v_v_orderClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":464
 *     cdef tuple v_partitionClause = _pg_list_to_tuple(data.partitionClause, offset_to_index)
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 *     cdef object v_frameOptions = data.frameOptions             # <<<<<<<<<<<<<<
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->frameOptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_frameOptions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":465
 *     cdef tuple v_orderClause = _pg_list_to_tuple(data.orderClause, offset_to_index)
 *     cdef object v_frameOptions = data.frameOptions
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 *     cdef tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)
 */
  if ((__pyx_v_data->startOffset != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->startOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_startOffset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":466
 *     cdef object v_frameOptions = data.frameOptions
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)
 *     cdef object v_inRangeAsc = bool(data.inRangeAsc)
 */
  if ((__pyx_v_data->endOffset != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->endOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_endOffset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":467
 *     cdef object v_startOffset = create(data.startOffset, offset_to_index) if data.startOffset is not NULL else None
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 *     cdef tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_inRangeAsc = bool(data.inRangeAsc)
 *     cdef object v_inRangeNullsFirst = bool(data.inRangeNullsFirst)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->runCondition, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 467, __pyx_L1_error)
  __pyx_v_v_runCondition = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":468
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 *     cdef tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)
 *     cdef object v_inRangeAsc = bool(data.inRangeAsc)             # <<<<<<<<<<<<<<
 *     cdef object v_inRangeNullsFirst = bool(data.inRangeNullsFirst)
 *     cdef object v_winref = data.winref
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->inRangeAsc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inRangeAsc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":469
 *     cdef tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)
 *     cdef object v_inRangeAsc = bool(data.inRangeAsc)
 *     cdef object v_inRangeNullsFirst = bool(data.inRangeNullsFirst)             # <<<<<<<<<<<<<<
 *     cdef object v_winref = data.winref
 *     cdef object v_copiedOrder = bool(data.copiedOrder)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->inRangeNullsFirst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inRangeNullsFirst = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":470
 *     cdef object v_inRangeAsc = bool(data.inRangeAsc)
 *     cdef object v_inRangeNullsFirst = bool(data.inRangeNullsFirst)
 *     cdef object v_winref = data.winref             # <<<<<<<<<<<<<<
 *     cdef object v_copiedOrder = bool(data.copiedOrder)
 *     return ast.WindowClause(v_name, v_refname, v_partitionClause, v_orderClause, v_frameOptions, v_startOffset, v_endOffset, v_runCondition, v_inRangeAsc, v_inRangeNullsFirst, v_winref, v_copiedOrder)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->winref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":471
 *     cdef object v_inRangeNullsFirst = bool(data.inRangeNullsFirst)
 *     cdef object v_winref = data.winref
 *     cdef object v_copiedOrder = bool(data.copiedOrder)             # <<<<<<<<<<<<<<
 *     return ast.WindowClause(v_name, v_refname, v_partitionClause, v_orderClause, v_frameOptions, v_startOffset, v_endOffset, v_runCondition, v_inRangeAsc, v_inRangeNullsFirst, v_winref, v_copiedOrder)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->copiedOrder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_copiedOrder = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":472
 *     cdef object v_winref = data.winref
 *     cdef object v_copiedOrder = bool(data.copiedOrder)
 *     return ast.WindowClause(v_name, v_refname, v_partitionClause, v_orderClause, v_frameOptions, v_startOffset, v_endOffset, v_runCondition, v_inRangeAsc, v_inRangeNullsFirst, v_winref, v_copiedOrder)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WindowClause); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[13] = {__pyx_t_3, __pyx_v_v_name, __pyx_v_v_refname, __pyx_v_v_partitionClause, __pyx_v_v_orderClause, __pyx_v_v_frameOptions, __pyx_v_v_startOffset, __pyx_v_v_endOffset, __pyx_v_v_runCondition, __pyx_v_v_inRangeAsc, __pyx_v_v_inRangeNullsFirst, __pyx_v_v_winref, __pyx_v_v_copiedOrder};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 12+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":459
 * 
 * 
 * cdef create_WindowClause(structs.WindowClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_refname = data.refname.decode("utf-8") if data.refname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_WindowClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_refname);
  __Pyx_XDECREF(__pyx_v_v_partitionClause);
  __Pyx_XDECREF(__pyx_v_v_orderClause);
  __Pyx_XDECREF(__pyx_v_v_frameOptions);
  __Pyx_XDECREF(__pyx_v_v_startOffset);
  __Pyx_XDECREF(__pyx_v_v_endOffset);
  __Pyx_XDECREF(__pyx_v_v_runCondition);
  __Pyx_XDECREF(__pyx_v_v_inRangeAsc);
  __Pyx_XDECREF(__pyx_v_v_inRangeNullsFirst);
  __Pyx_XDECREF(__pyx_v_v_winref);
  __Pyx_XDECREF(__pyx_v_v_copiedOrder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":475
 * 
 * 
 * cdef create_RowMarkClause(structs.RowMarkClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rti = data.rti
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RowMarkClause(RowMarkClause *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_rti = 0;
  PyObject *__pyx_v_v_strength = 0;
  PyObject *__pyx_v_v_waitPolicy = 0;
  PyObject *__pyx_v_v_pushedDown = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RowMarkClause", 0);

  /* "pglast/ast.pyx":476
 * 
 * cdef create_RowMarkClause(structs.RowMarkClause* data, offset_to_index):
 *     cdef object v_rti = data.rti             # <<<<<<<<<<<<<<
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->rti); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_rti = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":477
 * cdef create_RowMarkClause(structs.RowMarkClause* data, offset_to_index):
 *     cdef object v_rti = data.rti
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)             # <<<<<<<<<<<<<<
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)
 *     cdef object v_pushedDown = bool(data.pushedDown)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_LockClauseStrength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_LockClauseStrength(__pyx_v_data->strength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_strength = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":478
 *     cdef object v_rti = data.rti
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)             # <<<<<<<<<<<<<<
 *     cdef object v_pushedDown = bool(data.pushedDown)
 *     return ast.RowMarkClause(v_rti, v_strength, v_waitPolicy, v_pushedDown)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_LockWaitPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_LockWaitPolicy(__pyx_v_data->waitPolicy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_waitPolicy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":479
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)
 *     cdef object v_pushedDown = bool(data.pushedDown)             # <<<<<<<<<<<<<<
 *     return ast.RowMarkClause(v_rti, v_strength, v_waitPolicy, v_pushedDown)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->pushedDown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_pushedDown = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":480
 *     cdef object v_waitPolicy = getattr(enums, 'LockWaitPolicy')(data.waitPolicy)
 *     cdef object v_pushedDown = bool(data.pushedDown)
 *     return ast.RowMarkClause(v_rti, v_strength, v_waitPolicy, v_pushedDown)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RowMarkClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_rti, __pyx_v_v_strength, __pyx_v_v_waitPolicy, __pyx_v_v_pushedDown};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __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;

  /* "pglast/ast.pyx":475
 * 
 * 
 * cdef create_RowMarkClause(structs.RowMarkClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rti = data.rti
 *     cdef object v_strength = getattr(enums, 'LockClauseStrength')(data.strength)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RowMarkClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_rti);
  __Pyx_XDECREF(__pyx_v_v_strength);
  __Pyx_XDECREF(__pyx_v_v_waitPolicy);
  __Pyx_XDECREF(__pyx_v_v_pushedDown);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":483
 * 
 * 
 * cdef create_WithClause(structs.WithClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_ctes = _pg_list_to_tuple(data.ctes, offset_to_index)
 *     cdef object v_recursive = bool(data.recursive)
 */

static PyObject *__pyx_f_6pglast_6parser_create_WithClause(WithClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_ctes = 0;
  PyObject *__pyx_v_v_recursive = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WithClause", 0);

  /* "pglast/ast.pyx":484
 * 
 * cdef create_WithClause(structs.WithClause* data, offset_to_index):
 *     cdef tuple v_ctes = _pg_list_to_tuple(data.ctes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_recursive = bool(data.recursive)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->ctes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 484, __pyx_L1_error)
  __pyx_v_v_ctes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":485
 * cdef create_WithClause(structs.WithClause* data, offset_to_index):
 *     cdef tuple v_ctes = _pg_list_to_tuple(data.ctes, offset_to_index)
 *     cdef object v_recursive = bool(data.recursive)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.WithClause(v_ctes, v_recursive, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->recursive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_recursive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":486
 *     cdef tuple v_ctes = _pg_list_to_tuple(data.ctes, offset_to_index)
 *     cdef object v_recursive = bool(data.recursive)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.WithClause(v_ctes, v_recursive, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":487
 *     cdef object v_recursive = bool(data.recursive)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.WithClause(v_ctes, v_recursive, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_WithClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_ctes, __pyx_v_v_recursive, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __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;

  /* "pglast/ast.pyx":483
 * 
 * 
 * cdef create_WithClause(structs.WithClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_ctes = _pg_list_to_tuple(data.ctes, offset_to_index)
 *     cdef object v_recursive = bool(data.recursive)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_WithClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_ctes);
  __Pyx_XDECREF(__pyx_v_v_recursive);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":490
 * 
 * 
 * cdef create_InferClause(structs.InferClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_indexElems = _pg_list_to_tuple(data.indexElems, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_InferClause(InferClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_indexElems = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_conname = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InferClause", 0);

  /* "pglast/ast.pyx":491
 * 
 * cdef create_InferClause(structs.InferClause* data, offset_to_index):
 *     cdef tuple v_indexElems = _pg_list_to_tuple(data.indexElems, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->indexElems, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 491, __pyx_L1_error)
  __pyx_v_v_indexElems = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":492
 * cdef create_InferClause(structs.InferClause* data, offset_to_index):
 *     cdef tuple v_indexElems = _pg_list_to_tuple(data.indexElems, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":493
 *     cdef tuple v_indexElems = _pg_list_to_tuple(data.indexElems, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.InferClause(v_indexElems, v_whereClause, v_conname, v_location)
 */
  if ((__pyx_v_data->conname != NULL)) {
    __pyx_t_3 = __pyx_v_data->conname;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_conname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":494
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.InferClause(v_indexElems, v_whereClause, v_conname, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":495
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.InferClause(v_indexElems, v_whereClause, v_conname, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InferClause); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_indexElems, __pyx_v_v_whereClause, __pyx_v_v_conname, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __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;

  /* "pglast/ast.pyx":490
 * 
 * 
 * cdef create_InferClause(structs.InferClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_indexElems = _pg_list_to_tuple(data.indexElems, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_InferClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_indexElems);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_conname);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":498
 * 
 * 
 * cdef create_OnConflictClause(structs.OnConflictClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef object v_infer = create(data.infer, offset_to_index) if data.infer is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_OnConflictClause(OnConflictClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_action = 0;
  PyObject *__pyx_v_v_infer = 0;
  PyObject *__pyx_v_v_targetList = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_OnConflictClause", 0);

  /* "pglast/ast.pyx":499
 * 
 * cdef create_OnConflictClause(structs.OnConflictClause* data, offset_to_index):
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)             # <<<<<<<<<<<<<<
 *     cdef object v_infer = create(data.infer, offset_to_index) if data.infer is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_OnConflictAction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_OnConflictAction(__pyx_v_data->action); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":500
 * cdef create_OnConflictClause(structs.OnConflictClause* data, offset_to_index):
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef object v_infer = create(data.infer, offset_to_index) if data.infer is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */
  if ((__pyx_v_data->infer != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->infer, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_infer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":501
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef object v_infer = create(data.infer, offset_to_index) if data.infer is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->targetList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 501, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":502
 *     cdef object v_infer = create(data.infer, offset_to_index) if data.infer is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.OnConflictClause(v_action, v_infer, v_targetList, v_whereClause, v_location)
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":503
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.OnConflictClause(v_action, v_infer, v_targetList, v_whereClause, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":504
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.OnConflictClause(v_action, v_infer, v_targetList, v_whereClause, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OnConflictClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_action, __pyx_v_v_infer, __pyx_v_v_targetList, __pyx_v_v_whereClause, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __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;

  /* "pglast/ast.pyx":498
 * 
 * 
 * cdef create_OnConflictClause(structs.OnConflictClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef object v_infer = create(data.infer, offset_to_index) if data.infer is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_OnConflictClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_action);
  __Pyx_XDECREF(__pyx_v_v_infer);
  __Pyx_XDECREF(__pyx_v_v_targetList);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":507
 * 
 * 
 * cdef create_CTESearchClause(structs.CTESearchClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_search_col_list = _pg_list_to_tuple(data.search_col_list, offset_to_index)
 *     cdef object v_search_breadth_first = bool(data.search_breadth_first)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CTESearchClause(CTESearchClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_search_col_list = 0;
  PyObject *__pyx_v_v_search_breadth_first = 0;
  PyObject *__pyx_v_v_search_seq_column = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CTESearchClause", 0);

  /* "pglast/ast.pyx":508
 * 
 * cdef create_CTESearchClause(structs.CTESearchClause* data, offset_to_index):
 *     cdef tuple v_search_col_list = _pg_list_to_tuple(data.search_col_list, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_search_breadth_first = bool(data.search_breadth_first)
 *     cdef object v_search_seq_column = data.search_seq_column.decode("utf-8") if data.search_seq_column is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->search_col_list, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 508, __pyx_L1_error)
  __pyx_v_v_search_col_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":509
 * cdef create_CTESearchClause(structs.CTESearchClause* data, offset_to_index):
 *     cdef tuple v_search_col_list = _pg_list_to_tuple(data.search_col_list, offset_to_index)
 *     cdef object v_search_breadth_first = bool(data.search_breadth_first)             # <<<<<<<<<<<<<<
 *     cdef object v_search_seq_column = data.search_seq_column.decode("utf-8") if data.search_seq_column is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->search_breadth_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_search_breadth_first = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":510
 *     cdef tuple v_search_col_list = _pg_list_to_tuple(data.search_col_list, offset_to_index)
 *     cdef object v_search_breadth_first = bool(data.search_breadth_first)
 *     cdef object v_search_seq_column = data.search_seq_column.decode("utf-8") if data.search_seq_column is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CTESearchClause(v_search_col_list, v_search_breadth_first, v_search_seq_column, v_location)
 */
  if ((__pyx_v_data->search_seq_column != NULL)) {
    __pyx_t_3 = __pyx_v_data->search_seq_column;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_search_seq_column = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":511
 *     cdef object v_search_breadth_first = bool(data.search_breadth_first)
 *     cdef object v_search_seq_column = data.search_seq_column.decode("utf-8") if data.search_seq_column is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CTESearchClause(v_search_col_list, v_search_breadth_first, v_search_seq_column, v_location)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_5 = __pyx_v_offset_to_index; __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":512
 *     cdef object v_search_seq_column = data.search_seq_column.decode("utf-8") if data.search_seq_column is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CTESearchClause(v_search_col_list, v_search_breadth_first, v_search_seq_column, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CTESearchClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_search_col_list, __pyx_v_v_search_breadth_first, __pyx_v_v_search_seq_column, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":507
 * 
 * 
 * cdef create_CTESearchClause(structs.CTESearchClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_search_col_list = _pg_list_to_tuple(data.search_col_list, offset_to_index)
 *     cdef object v_search_breadth_first = bool(data.search_breadth_first)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_CTESearchClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_search_col_list);
  __Pyx_XDECREF(__pyx_v_v_search_breadth_first);
  __Pyx_XDECREF(__pyx_v_v_search_seq_column);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":515
 * 
 * 
 * cdef create_CTECycleClause(structs.CTECycleClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_cycle_col_list = _pg_list_to_tuple(data.cycle_col_list, offset_to_index)
 *     cdef object v_cycle_mark_column = data.cycle_mark_column.decode("utf-8") if data.cycle_mark_column is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CTECycleClause(CTECycleClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_cycle_col_list = 0;
  PyObject *__pyx_v_v_cycle_mark_column = 0;
  PyObject *__pyx_v_v_cycle_mark_value = 0;
  PyObject *__pyx_v_v_cycle_mark_default = 0;
  PyObject *__pyx_v_v_cycle_path_column = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_v_v_cycle_mark_typmod = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CTECycleClause", 0);

  /* "pglast/ast.pyx":516
 * 
 * cdef create_CTECycleClause(structs.CTECycleClause* data, offset_to_index):
 *     cdef tuple v_cycle_col_list = _pg_list_to_tuple(data.cycle_col_list, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_cycle_mark_column = data.cycle_mark_column.decode("utf-8") if data.cycle_mark_column is not NULL else None
 *     cdef object v_cycle_mark_value = create(data.cycle_mark_value, offset_to_index) if data.cycle_mark_value is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->cycle_col_list, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 516, __pyx_L1_error)
  __pyx_v_v_cycle_col_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":517
 * cdef create_CTECycleClause(structs.CTECycleClause* data, offset_to_index):
 *     cdef tuple v_cycle_col_list = _pg_list_to_tuple(data.cycle_col_list, offset_to_index)
 *     cdef object v_cycle_mark_column = data.cycle_mark_column.decode("utf-8") if data.cycle_mark_column is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cycle_mark_value = create(data.cycle_mark_value, offset_to_index) if data.cycle_mark_value is not NULL else None
 *     cdef object v_cycle_mark_default = create(data.cycle_mark_default, offset_to_index) if data.cycle_mark_default is not NULL else None
 */
  if ((__pyx_v_data->cycle_mark_column != NULL)) {
    __pyx_t_2 = __pyx_v_data->cycle_mark_column;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cycle_mark_column = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":518
 *     cdef tuple v_cycle_col_list = _pg_list_to_tuple(data.cycle_col_list, offset_to_index)
 *     cdef object v_cycle_mark_column = data.cycle_mark_column.decode("utf-8") if data.cycle_mark_column is not NULL else None
 *     cdef object v_cycle_mark_value = create(data.cycle_mark_value, offset_to_index) if data.cycle_mark_value is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cycle_mark_default = create(data.cycle_mark_default, offset_to_index) if data.cycle_mark_default is not NULL else None
 *     cdef object v_cycle_path_column = data.cycle_path_column.decode("utf-8") if data.cycle_path_column is not NULL else None
 */
  if ((__pyx_v_data->cycle_mark_value != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cycle_mark_value, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cycle_mark_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":519
 *     cdef object v_cycle_mark_column = data.cycle_mark_column.decode("utf-8") if data.cycle_mark_column is not NULL else None
 *     cdef object v_cycle_mark_value = create(data.cycle_mark_value, offset_to_index) if data.cycle_mark_value is not NULL else None
 *     cdef object v_cycle_mark_default = create(data.cycle_mark_default, offset_to_index) if data.cycle_mark_default is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cycle_path_column = data.cycle_path_column.decode("utf-8") if data.cycle_path_column is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->cycle_mark_default != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cycle_mark_default, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cycle_mark_default = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":520
 *     cdef object v_cycle_mark_value = create(data.cycle_mark_value, offset_to_index) if data.cycle_mark_value is not NULL else None
 *     cdef object v_cycle_mark_default = create(data.cycle_mark_default, offset_to_index) if data.cycle_mark_default is not NULL else None
 *     cdef object v_cycle_path_column = data.cycle_path_column.decode("utf-8") if data.cycle_path_column is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_cycle_mark_typmod = data.cycle_mark_typmod
 */
  if ((__pyx_v_data->cycle_path_column != NULL)) {
    __pyx_t_4 = __pyx_v_data->cycle_path_column;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cycle_path_column = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":521
 *     cdef object v_cycle_mark_default = create(data.cycle_mark_default, offset_to_index) if data.cycle_mark_default is not NULL else None
 *     cdef object v_cycle_path_column = data.cycle_path_column.decode("utf-8") if data.cycle_path_column is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     cdef object v_cycle_mark_typmod = data.cycle_mark_typmod
 *     return ast.CTECycleClause(v_cycle_col_list, v_cycle_mark_column, v_cycle_mark_value, v_cycle_mark_default, v_cycle_path_column, v_location, v_cycle_mark_typmod)
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_5 = __pyx_v_offset_to_index; __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":522
 *     cdef object v_cycle_path_column = data.cycle_path_column.decode("utf-8") if data.cycle_path_column is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_cycle_mark_typmod = data.cycle_mark_typmod             # <<<<<<<<<<<<<<
 *     return ast.CTECycleClause(v_cycle_col_list, v_cycle_mark_column, v_cycle_mark_value, v_cycle_mark_default, v_cycle_path_column, v_location, v_cycle_mark_typmod)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->cycle_mark_typmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cycle_mark_typmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":523
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_cycle_mark_typmod = data.cycle_mark_typmod
 *     return ast.CTECycleClause(v_cycle_col_list, v_cycle_mark_column, v_cycle_mark_value, v_cycle_mark_default, v_cycle_path_column, v_location, v_cycle_mark_typmod)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CTECycleClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_5, __pyx_v_v_cycle_col_list, __pyx_v_v_cycle_mark_column, __pyx_v_v_cycle_mark_value, __pyx_v_v_cycle_mark_default, __pyx_v_v_cycle_path_column, __pyx_v_v_location, __pyx_v_v_cycle_mark_typmod};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 7+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __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;

  /* "pglast/ast.pyx":515
 * 
 * 
 * cdef create_CTECycleClause(structs.CTECycleClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_cycle_col_list = _pg_list_to_tuple(data.cycle_col_list, offset_to_index)
 *     cdef object v_cycle_mark_column = data.cycle_mark_column.decode("utf-8") if data.cycle_mark_column is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_CTECycleClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_cycle_col_list);
  __Pyx_XDECREF(__pyx_v_v_cycle_mark_column);
  __Pyx_XDECREF(__pyx_v_v_cycle_mark_value);
  __Pyx_XDECREF(__pyx_v_v_cycle_mark_default);
  __Pyx_XDECREF(__pyx_v_v_cycle_path_column);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XDECREF(__pyx_v_v_cycle_mark_typmod);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":526
 * 
 * 
 * cdef create_CommonTableExpr(structs.CommonTableExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 *     cdef tuple v_aliascolnames = _pg_list_to_tuple(data.aliascolnames, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CommonTableExpr(CommonTableExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_ctename = 0;
  PyObject *__pyx_v_v_aliascolnames = 0;
  PyObject *__pyx_v_v_ctematerialized = 0;
  PyObject *__pyx_v_v_ctequery = 0;
  PyObject *__pyx_v_v_search_clause = 0;
  PyObject *__pyx_v_v_cycle_clause = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_v_v_cterecursive = 0;
  PyObject *__pyx_v_v_cterefcount = 0;
  PyObject *__pyx_v_v_ctecolnames = 0;
  PyObject *__pyx_v_v_ctecoltypes = 0;
  PyObject *__pyx_v_v_ctecoltypmods = 0;
  PyObject *__pyx_v_v_ctecolcollations = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CommonTableExpr", 0);

  /* "pglast/ast.pyx":527
 * 
 * cdef create_CommonTableExpr(structs.CommonTableExpr* data, offset_to_index):
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_aliascolnames = _pg_list_to_tuple(data.aliascolnames, offset_to_index)
 *     cdef object v_ctematerialized = getattr(enums, 'CTEMaterialize')(data.ctematerialized)
 */
  if ((__pyx_v_data->ctename != NULL)) {
    __pyx_t_2 = __pyx_v_data->ctename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_ctename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":528
 * cdef create_CommonTableExpr(structs.CommonTableExpr* data, offset_to_index):
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 *     cdef tuple v_aliascolnames = _pg_list_to_tuple(data.aliascolnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_ctematerialized = getattr(enums, 'CTEMaterialize')(data.ctematerialized)
 *     cdef object v_ctequery = create(data.ctequery, offset_to_index) if data.ctequery is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->aliascolnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 528, __pyx_L1_error)
  __pyx_v_v_aliascolnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":529
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 *     cdef tuple v_aliascolnames = _pg_list_to_tuple(data.aliascolnames, offset_to_index)
 *     cdef object v_ctematerialized = getattr(enums, 'CTEMaterialize')(data.ctematerialized)             # <<<<<<<<<<<<<<
 *     cdef object v_ctequery = create(data.ctequery, offset_to_index) if data.ctequery is not NULL else None
 *     cdef object v_search_clause = create(data.search_clause, offset_to_index) if data.search_clause is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_CTEMaterialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_CTEMaterialize(__pyx_v_data->ctematerialized); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_ctematerialized = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":530
 *     cdef tuple v_aliascolnames = _pg_list_to_tuple(data.aliascolnames, offset_to_index)
 *     cdef object v_ctematerialized = getattr(enums, 'CTEMaterialize')(data.ctematerialized)
 *     cdef object v_ctequery = create(data.ctequery, offset_to_index) if data.ctequery is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_search_clause = create(data.search_clause, offset_to_index) if data.search_clause is not NULL else None
 *     cdef object v_cycle_clause = create(data.cycle_clause, offset_to_index) if data.cycle_clause is not NULL else None
 */
  if ((__pyx_v_data->ctequery != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->ctequery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_ctequery = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":531
 *     cdef object v_ctematerialized = getattr(enums, 'CTEMaterialize')(data.ctematerialized)
 *     cdef object v_ctequery = create(data.ctequery, offset_to_index) if data.ctequery is not NULL else None
 *     cdef object v_search_clause = create(data.search_clause, offset_to_index) if data.search_clause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cycle_clause = create(data.cycle_clause, offset_to_index) if data.cycle_clause is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->search_clause != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->search_clause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_search_clause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":532
 *     cdef object v_ctequery = create(data.ctequery, offset_to_index) if data.ctequery is not NULL else None
 *     cdef object v_search_clause = create(data.search_clause, offset_to_index) if data.search_clause is not NULL else None
 *     cdef object v_cycle_clause = create(data.cycle_clause, offset_to_index) if data.cycle_clause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_cterecursive = bool(data.cterecursive)
 */
  if ((__pyx_v_data->cycle_clause != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cycle_clause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cycle_clause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":533
 *     cdef object v_search_clause = create(data.search_clause, offset_to_index) if data.search_clause is not NULL else None
 *     cdef object v_cycle_clause = create(data.cycle_clause, offset_to_index) if data.cycle_clause is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     cdef object v_cterecursive = bool(data.cterecursive)
 *     cdef object v_cterefcount = data.cterefcount
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":534
 *     cdef object v_cycle_clause = create(data.cycle_clause, offset_to_index) if data.cycle_clause is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_cterecursive = bool(data.cterecursive)             # <<<<<<<<<<<<<<
 *     cdef object v_cterefcount = data.cterefcount
 *     cdef tuple v_ctecolnames = _pg_list_to_tuple(data.ctecolnames, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->cterecursive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cterecursive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":535
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_cterecursive = bool(data.cterecursive)
 *     cdef object v_cterefcount = data.cterefcount             # <<<<<<<<<<<<<<
 *     cdef tuple v_ctecolnames = _pg_list_to_tuple(data.ctecolnames, offset_to_index)
 *     cdef tuple v_ctecoltypes = _pg_list_to_tuple(data.ctecoltypes, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->cterefcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cterefcount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":536
 *     cdef object v_cterecursive = bool(data.cterecursive)
 *     cdef object v_cterefcount = data.cterefcount
 *     cdef tuple v_ctecolnames = _pg_list_to_tuple(data.ctecolnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_ctecoltypes = _pg_list_to_tuple(data.ctecoltypes, offset_to_index)
 *     cdef tuple v_ctecoltypmods = _pg_list_to_tuple(data.ctecoltypmods, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->ctecolnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 536, __pyx_L1_error)
  __pyx_v_v_ctecolnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":537
 *     cdef object v_cterefcount = data.cterefcount
 *     cdef tuple v_ctecolnames = _pg_list_to_tuple(data.ctecolnames, offset_to_index)
 *     cdef tuple v_ctecoltypes = _pg_list_to_tuple(data.ctecoltypes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_ctecoltypmods = _pg_list_to_tuple(data.ctecoltypmods, offset_to_index)
 *     cdef tuple v_ctecolcollations = _pg_list_to_tuple(data.ctecolcollations, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->ctecoltypes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 537, __pyx_L1_error)
  __pyx_v_v_ctecoltypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":538
 *     cdef tuple v_ctecolnames = _pg_list_to_tuple(data.ctecolnames, offset_to_index)
 *     cdef tuple v_ctecoltypes = _pg_list_to_tuple(data.ctecoltypes, offset_to_index)
 *     cdef tuple v_ctecoltypmods = _pg_list_to_tuple(data.ctecoltypmods, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_ctecolcollations = _pg_list_to_tuple(data.ctecolcollations, offset_to_index)
 *     return ast.CommonTableExpr(v_ctename, v_aliascolnames, v_ctematerialized, v_ctequery, v_search_clause, v_cycle_clause, v_location, v_cterecursive, v_cterefcount, v_ctecolnames, v_ctecoltypes, v_ctecoltypmods, v_ctecolcollations)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->ctecoltypmods, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 538, __pyx_L1_error)
  __pyx_v_v_ctecoltypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":539
 *     cdef tuple v_ctecoltypes = _pg_list_to_tuple(data.ctecoltypes, offset_to_index)
 *     cdef tuple v_ctecoltypmods = _pg_list_to_tuple(data.ctecoltypmods, offset_to_index)
 *     cdef tuple v_ctecolcollations = _pg_list_to_tuple(data.ctecolcollations, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CommonTableExpr(v_ctename, v_aliascolnames, v_ctematerialized, v_ctequery, v_search_clause, v_cycle_clause, v_location, v_cterecursive, v_cterefcount, v_ctecolnames, v_ctecoltypes, v_ctecoltypmods, v_ctecolcollations)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->ctecolcollations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 539, __pyx_L1_error)
  __pyx_v_v_ctecolcollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":540
 *     cdef tuple v_ctecoltypmods = _pg_list_to_tuple(data.ctecoltypmods, offset_to_index)
 *     cdef tuple v_ctecolcollations = _pg_list_to_tuple(data.ctecolcollations, offset_to_index)
 *     return ast.CommonTableExpr(v_ctename, v_aliascolnames, v_ctematerialized, v_ctequery, v_search_clause, v_cycle_clause, v_location, v_cterecursive, v_cterefcount, v_ctecolnames, v_ctecoltypes, v_ctecoltypmods, v_ctecolcollations)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CommonTableExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[14] = {__pyx_t_3, __pyx_v_v_ctename, __pyx_v_v_aliascolnames, __pyx_v_v_ctematerialized, __pyx_v_v_ctequery, __pyx_v_v_search_clause, __pyx_v_v_cycle_clause, __pyx_v_v_location, __pyx_v_v_cterecursive, __pyx_v_v_cterefcount, __pyx_v_v_ctecolnames, __pyx_v_v_ctecoltypes, __pyx_v_v_ctecoltypmods, __pyx_v_v_ctecolcollations};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 13+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":526
 * 
 * 
 * cdef create_CommonTableExpr(structs.CommonTableExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_ctename = data.ctename.decode("utf-8") if data.ctename is not NULL else None
 *     cdef tuple v_aliascolnames = _pg_list_to_tuple(data.aliascolnames, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CommonTableExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_ctename);
  __Pyx_XDECREF(__pyx_v_v_aliascolnames);
  __Pyx_XDECREF(__pyx_v_v_ctematerialized);
  __Pyx_XDECREF(__pyx_v_v_ctequery);
  __Pyx_XDECREF(__pyx_v_v_search_clause);
  __Pyx_XDECREF(__pyx_v_v_cycle_clause);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XDECREF(__pyx_v_v_cterecursive);
  __Pyx_XDECREF(__pyx_v_v_cterefcount);
  __Pyx_XDECREF(__pyx_v_v_ctecolnames);
  __Pyx_XDECREF(__pyx_v_v_ctecoltypes);
  __Pyx_XDECREF(__pyx_v_v_ctecoltypmods);
  __Pyx_XDECREF(__pyx_v_v_ctecolcollations);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":543
 * 
 * 
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 */

static PyObject *__pyx_f_6pglast_6parser_create_MergeWhenClause(MergeWhenClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_matched = 0;
  PyObject *__pyx_v_v_commandType = 0;
  PyObject *__pyx_v_v_override = 0;
  PyObject *__pyx_v_v_condition = 0;
  PyObject *__pyx_v_v_targetList = 0;
  PyObject *__pyx_v_v_values = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MergeWhenClause", 0);

  /* "pglast/ast.pyx":544
 * 
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):
 *     cdef object v_matched = bool(data.matched)             # <<<<<<<<<<<<<<
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->matched); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_matched = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":545
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)             # <<<<<<<<<<<<<<
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_condition = create(data.condition, offset_to_index) if data.condition is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_CmdType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_CmdType(__pyx_v_data->commandType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_commandType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":546
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)             # <<<<<<<<<<<<<<
 *     cdef object v_condition = create(data.condition, offset_to_index) if data.condition is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_4, __pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":547
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_condition = create(data.condition, offset_to_index) if data.condition is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_values = _pg_list_to_tuple(data.values, offset_to_index)
 */
  if ((__pyx_v_data->condition != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->condition, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_condition = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":548
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_condition = create(data.condition, offset_to_index) if data.condition is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_values = _pg_list_to_tuple(data.values, offset_to_index)
 *     return ast.MergeWhenClause(v_matched, v_commandType, v_override, v_condition, v_targetList, v_values)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->targetList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 548, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":549
 *     cdef object v_condition = create(data.condition, offset_to_index) if data.condition is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_values = _pg_list_to_tuple(data.values, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.MergeWhenClause(v_matched, v_commandType, v_override, v_condition, v_targetList, v_values)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->values, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 549, __pyx_L1_error)
  __pyx_v_v_values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":550
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_values = _pg_list_to_tuple(data.values, offset_to_index)
 *     return ast.MergeWhenClause(v_matched, v_commandType, v_override, v_condition, v_targetList, v_values)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_MergeWhenClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_matched, __pyx_v_v_commandType, __pyx_v_v_override, __pyx_v_v_condition, __pyx_v_v_targetList, __pyx_v_v_values};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":543
 * 
 * 
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_MergeWhenClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_matched);
  __Pyx_XDECREF(__pyx_v_v_commandType);
  __Pyx_XDECREF(__pyx_v_v_override);
  __Pyx_XDECREF(__pyx_v_v_condition);
  __Pyx_XDECREF(__pyx_v_v_targetList);
  __Pyx_XDECREF(__pyx_v_v_values);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":553
 * 
 * 
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 */

static PyObject *__pyx_f_6pglast_6parser_create_MergeAction(MergeAction *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_matched = 0;
  PyObject *__pyx_v_v_commandType = 0;
  PyObject *__pyx_v_v_override = 0;
  PyObject *__pyx_v_v_qual = 0;
  PyObject *__pyx_v_v_targetList = 0;
  PyObject *__pyx_v_v_updateColnos = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MergeAction", 0);

  /* "pglast/ast.pyx":554
 * 
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):
 *     cdef object v_matched = bool(data.matched)             # <<<<<<<<<<<<<<
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->matched); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_matched = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":555
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)             # <<<<<<<<<<<<<<
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_CmdType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_CmdType(__pyx_v_data->commandType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_commandType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":556
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)             # <<<<<<<<<<<<<<
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_4, __pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":557
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_updateColnos = _pg_list_to_tuple(data.updateColnos, offset_to_index)
 */
  if ((__pyx_v_data->qual != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_qual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":558
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_updateColnos = _pg_list_to_tuple(data.updateColnos, offset_to_index)
 *     return ast.MergeAction(v_matched, v_commandType, v_override, v_qual, v_targetList, v_updateColnos)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->targetList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 558, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":559
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_updateColnos = _pg_list_to_tuple(data.updateColnos, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.MergeAction(v_matched, v_commandType, v_override, v_qual, v_targetList, v_updateColnos)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->updateColnos, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 559, __pyx_L1_error)
  __pyx_v_v_updateColnos = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":560
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_updateColnos = _pg_list_to_tuple(data.updateColnos, offset_to_index)
 *     return ast.MergeAction(v_matched, v_commandType, v_override, v_qual, v_targetList, v_updateColnos)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_MergeAction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_matched, __pyx_v_v_commandType, __pyx_v_v_override, __pyx_v_v_qual, __pyx_v_v_targetList, __pyx_v_v_updateColnos};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":553
 * 
 * 
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matched = bool(data.matched)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_MergeAction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_matched);
  __Pyx_XDECREF(__pyx_v_v_commandType);
  __Pyx_XDECREF(__pyx_v_v_override);
  __Pyx_XDECREF(__pyx_v_v_qual);
  __Pyx_XDECREF(__pyx_v_v_targetList);
  __Pyx_XDECREF(__pyx_v_v_updateColnos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":563
 * 
 * 
 * cdef create_TriggerTransition(structs.TriggerTransition* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_isNew = bool(data.isNew)
 */

static PyObject *__pyx_f_6pglast_6parser_create_TriggerTransition(TriggerTransition *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_isNew = 0;
  PyObject *__pyx_v_v_isTable = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TriggerTransition", 0);

  /* "pglast/ast.pyx":564
 * 
 * cdef create_TriggerTransition(structs.TriggerTransition* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_isNew = bool(data.isNew)
 *     cdef object v_isTable = bool(data.isTable)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":565
 * cdef create_TriggerTransition(structs.TriggerTransition* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_isNew = bool(data.isNew)             # <<<<<<<<<<<<<<
 *     cdef object v_isTable = bool(data.isTable)
 *     return ast.TriggerTransition(v_name, v_isNew, v_isTable)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isNew); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isNew = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":566
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_isNew = bool(data.isNew)
 *     cdef object v_isTable = bool(data.isTable)             # <<<<<<<<<<<<<<
 *     return ast.TriggerTransition(v_name, v_isNew, v_isTable)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isTable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":567
 *     cdef object v_isNew = bool(data.isNew)
 *     cdef object v_isTable = bool(data.isTable)
 *     return ast.TriggerTransition(v_name, v_isNew, v_isTable)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TriggerTransition); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_name, __pyx_v_v_isNew, __pyx_v_v_isTable};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":563
 * 
 * 
 * cdef create_TriggerTransition(structs.TriggerTransition* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_isNew = bool(data.isNew)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_TriggerTransition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_isNew);
  __Pyx_XDECREF(__pyx_v_v_isTable);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":570
 * 
 * 
 * cdef create_RawStmt(structs.RawStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_stmt = create(data.stmt, offset_to_index) if data.stmt is not NULL else None
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RawStmt(RawStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_stmt = 0;
  PyObject *__pyx_v_v_stmt_location = 0;
  PyObject *__pyx_v_v_stmt_len = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RawStmt", 0);

  /* "pglast/ast.pyx":571
 * 
 * cdef create_RawStmt(structs.RawStmt* data, offset_to_index):
 *     cdef object v_stmt = create(data.stmt, offset_to_index) if data.stmt is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)
 */
  if ((__pyx_v_data->stmt != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->stmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_stmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":572
 * cdef create_RawStmt(structs.RawStmt* data, offset_to_index):
 *     cdef object v_stmt = create(data.stmt, offset_to_index) if data.stmt is not NULL else None
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)             # <<<<<<<<<<<<<<
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)
 *     return ast.RawStmt(v_stmt, v_stmt_location, v_stmt_len)
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_stmt_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":573
 *     cdef object v_stmt = create(data.stmt, offset_to_index) if data.stmt is not NULL else None
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)             # <<<<<<<<<<<<<<
 *     return ast.RawStmt(v_stmt, v_stmt_location, v_stmt_len)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_data->stmt_location + __pyx_v_data->stmt_len)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_v_stmt_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pglast/ast.pyx":574
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 *     cdef object v_stmt_len = offset_to_index(data.stmt_location + data.stmt_len) - offset_to_index(data.stmt_location)
 *     return ast.RawStmt(v_stmt, v_stmt_location, v_stmt_len)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RawStmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_stmt, __pyx_v_v_stmt_location, __pyx_v_v_stmt_len};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":570
 * 
 * 
 * cdef create_RawStmt(structs.RawStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_stmt = create(data.stmt, offset_to_index) if data.stmt is not NULL else None
 *     cdef object v_stmt_location = offset_to_index(data.stmt_location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_RawStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_stmt);
  __Pyx_XDECREF(__pyx_v_v_stmt_location);
  __Pyx_XDECREF(__pyx_v_v_stmt_len);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":577
 * 
 * 
 * cdef create_InsertStmt(structs.InsertStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_InsertStmt(InsertStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_cols = 0;
  PyObject *__pyx_v_v_selectStmt = 0;
  PyObject *__pyx_v_v_onConflictClause = 0;
  PyObject *__pyx_v_v_returningList = 0;
  PyObject *__pyx_v_v_withClause = 0;
  PyObject *__pyx_v_v_override = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InsertStmt", 0);

  /* "pglast/ast.pyx":578
 * 
 * cdef create_InsertStmt(structs.InsertStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     cdef object v_selectStmt = create(data.selectStmt, offset_to_index) if data.selectStmt is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":579
 * cdef create_InsertStmt(structs.InsertStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_selectStmt = create(data.selectStmt, offset_to_index) if data.selectStmt is not NULL else None
 *     cdef object v_onConflictClause = create(data.onConflictClause, offset_to_index) if data.onConflictClause is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->cols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 579, __pyx_L1_error)
  __pyx_v_v_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":580
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     cdef object v_selectStmt = create(data.selectStmt, offset_to_index) if data.selectStmt is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_onConflictClause = create(data.onConflictClause, offset_to_index) if data.onConflictClause is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 */
  if ((__pyx_v_data->selectStmt != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->selectStmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_selectStmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":581
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     cdef object v_selectStmt = create(data.selectStmt, offset_to_index) if data.selectStmt is not NULL else None
 *     cdef object v_onConflictClause = create(data.onConflictClause, offset_to_index) if data.onConflictClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 */
  if ((__pyx_v_data->onConflictClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->onConflictClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_onConflictClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":582
 *     cdef object v_selectStmt = create(data.selectStmt, offset_to_index) if data.selectStmt is not NULL else None
 *     cdef object v_onConflictClause = create(data.onConflictClause, offset_to_index) if data.onConflictClause is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->returningList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 582, __pyx_L1_error)
  __pyx_v_v_returningList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":583
 *     cdef object v_onConflictClause = create(data.onConflictClause, offset_to_index) if data.onConflictClause is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     return ast.InsertStmt(v_relation, v_cols, v_selectStmt, v_onConflictClause, v_returningList, v_withClause, v_override)
 */
  if ((__pyx_v_data->withClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":584
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)             # <<<<<<<<<<<<<<
 *     return ast.InsertStmt(v_relation, v_cols, v_selectStmt, v_onConflictClause, v_returningList, v_withClause, v_override)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":585
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
 *     return ast.InsertStmt(v_relation, v_cols, v_selectStmt, v_onConflictClause, v_returningList, v_withClause, v_override)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InsertStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_cols, __pyx_v_v_selectStmt, __pyx_v_v_onConflictClause, __pyx_v_v_returningList, __pyx_v_v_withClause, __pyx_v_v_override};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __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;

  /* "pglast/ast.pyx":577
 * 
 * 
 * cdef create_InsertStmt(structs.InsertStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_InsertStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_cols);
  __Pyx_XDECREF(__pyx_v_v_selectStmt);
  __Pyx_XDECREF(__pyx_v_v_onConflictClause);
  __Pyx_XDECREF(__pyx_v_v_returningList);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XDECREF(__pyx_v_v_override);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":588
 * 
 * 
 * cdef create_DeleteStmt(structs.DeleteStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DeleteStmt(DeleteStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_usingClause = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_returningList = 0;
  PyObject *__pyx_v_v_withClause = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DeleteStmt", 0);

  /* "pglast/ast.pyx":589
 * 
 * cdef create_DeleteStmt(structs.DeleteStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":590
 * cdef create_DeleteStmt(structs.DeleteStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->usingClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 590, __pyx_L1_error)
  __pyx_v_v_usingClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":591
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":592
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     return ast.DeleteStmt(v_relation, v_usingClause, v_whereClause, v_returningList, v_withClause)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->returningList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 592, __pyx_L1_error)
  __pyx_v_v_returningList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":593
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.DeleteStmt(v_relation, v_usingClause, v_whereClause, v_returningList, v_withClause)
 * 
 */
  if ((__pyx_v_data->withClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":594
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     return ast.DeleteStmt(v_relation, v_usingClause, v_whereClause, v_returningList, v_withClause)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DeleteStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_usingClause, __pyx_v_v_whereClause, __pyx_v_v_returningList, __pyx_v_v_withClause};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 5+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __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;

  /* "pglast/ast.pyx":588
 * 
 * 
 * cdef create_DeleteStmt(structs.DeleteStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_DeleteStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_usingClause);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_returningList);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":597
 * 
 * 
 * cdef create_UpdateStmt(structs.UpdateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_UpdateStmt(UpdateStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_targetList = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_fromClause = 0;
  PyObject *__pyx_v_v_returningList = 0;
  PyObject *__pyx_v_v_withClause = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_UpdateStmt", 0);

  /* "pglast/ast.pyx":598
 * 
 * cdef create_UpdateStmt(structs.UpdateStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":599
 * cdef create_UpdateStmt(structs.UpdateStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->targetList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 599, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":600
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":601
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fromClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 601, __pyx_L1_error)
  __pyx_v_v_fromClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":602
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     return ast.UpdateStmt(v_relation, v_targetList, v_whereClause, v_fromClause, v_returningList, v_withClause)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->returningList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 602, __pyx_L1_error)
  __pyx_v_v_returningList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":603
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.UpdateStmt(v_relation, v_targetList, v_whereClause, v_fromClause, v_returningList, v_withClause)
 * 
 */
  if ((__pyx_v_data->withClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":604
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     return ast.UpdateStmt(v_relation, v_targetList, v_whereClause, v_fromClause, v_returningList, v_withClause)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_UpdateStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_targetList, __pyx_v_v_whereClause, __pyx_v_v_fromClause, __pyx_v_v_returningList, __pyx_v_v_withClause};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 6+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __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;

  /* "pglast/ast.pyx":597
 * 
 * 
 * cdef create_UpdateStmt(structs.UpdateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_UpdateStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_targetList);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_fromClause);
  __Pyx_XDECREF(__pyx_v_v_returningList);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":607
 * 
 * 
 * cdef create_MergeStmt(structs.MergeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_sourceRelation = create(data.sourceRelation, offset_to_index) if data.sourceRelation is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_MergeStmt(MergeStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_sourceRelation = 0;
  PyObject *__pyx_v_v_joinCondition = 0;
  PyObject *__pyx_v_v_mergeWhenClauses = 0;
  PyObject *__pyx_v_v_withClause = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MergeStmt", 0);

  /* "pglast/ast.pyx":608
 * 
 * cdef create_MergeStmt(structs.MergeStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_sourceRelation = create(data.sourceRelation, offset_to_index) if data.sourceRelation is not NULL else None
 *     cdef object v_joinCondition = create(data.joinCondition, offset_to_index) if data.joinCondition is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":609
 * cdef create_MergeStmt(structs.MergeStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_sourceRelation = create(data.sourceRelation, offset_to_index) if data.sourceRelation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_joinCondition = create(data.joinCondition, offset_to_index) if data.joinCondition is not NULL else None
 *     cdef tuple v_mergeWhenClauses = _pg_list_to_tuple(data.mergeWhenClauses, offset_to_index)
 */
  if ((__pyx_v_data->sourceRelation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sourceRelation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_sourceRelation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":610
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_sourceRelation = create(data.sourceRelation, offset_to_index) if data.sourceRelation is not NULL else None
 *     cdef object v_joinCondition = create(data.joinCondition, offset_to_index) if data.joinCondition is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_mergeWhenClauses = _pg_list_to_tuple(data.mergeWhenClauses, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 */
  if ((__pyx_v_data->joinCondition != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->joinCondition, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_joinCondition = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":611
 *     cdef object v_sourceRelation = create(data.sourceRelation, offset_to_index) if data.sourceRelation is not NULL else None
 *     cdef object v_joinCondition = create(data.joinCondition, offset_to_index) if data.joinCondition is not NULL else None
 *     cdef tuple v_mergeWhenClauses = _pg_list_to_tuple(data.mergeWhenClauses, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     return ast.MergeStmt(v_relation, v_sourceRelation, v_joinCondition, v_mergeWhenClauses, v_withClause)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->mergeWhenClauses, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 611, __pyx_L1_error)
  __pyx_v_v_mergeWhenClauses = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":612
 *     cdef object v_joinCondition = create(data.joinCondition, offset_to_index) if data.joinCondition is not NULL else None
 *     cdef tuple v_mergeWhenClauses = _pg_list_to_tuple(data.mergeWhenClauses, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.MergeStmt(v_relation, v_sourceRelation, v_joinCondition, v_mergeWhenClauses, v_withClause)
 * 
 */
  if ((__pyx_v_data->withClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":613
 *     cdef tuple v_mergeWhenClauses = _pg_list_to_tuple(data.mergeWhenClauses, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     return ast.MergeStmt(v_relation, v_sourceRelation, v_joinCondition, v_mergeWhenClauses, v_withClause)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_MergeStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_sourceRelation, __pyx_v_v_joinCondition, __pyx_v_v_mergeWhenClauses, __pyx_v_v_withClause};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 5+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __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;

  /* "pglast/ast.pyx":607
 * 
 * 
 * cdef create_MergeStmt(structs.MergeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_sourceRelation = create(data.sourceRelation, offset_to_index) if data.sourceRelation is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_MergeStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_sourceRelation);
  __Pyx_XDECREF(__pyx_v_v_joinCondition);
  __Pyx_XDECREF(__pyx_v_v_mergeWhenClauses);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":616
 * 
 * 
 * cdef create_SelectStmt(structs.SelectStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 *     cdef object v_intoClause = create(data.intoClause, offset_to_index) if data.intoClause is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_SelectStmt(SelectStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_distinctClause = 0;
  PyObject *__pyx_v_v_intoClause = 0;
  PyObject *__pyx_v_v_targetList = 0;
  PyObject *__pyx_v_v_fromClause = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_groupClause = 0;
  PyObject *__pyx_v_v_groupDistinct = 0;
  PyObject *__pyx_v_v_havingClause = 0;
  PyObject *__pyx_v_v_windowClause = 0;
  PyObject *__pyx_v_v_valuesLists = 0;
  PyObject *__pyx_v_v_sortClause = 0;
  PyObject *__pyx_v_v_limitOffset = 0;
  PyObject *__pyx_v_v_limitCount = 0;
  PyObject *__pyx_v_v_limitOption = 0;
  PyObject *__pyx_v_v_lockingClause = 0;
  PyObject *__pyx_v_v_withClause = 0;
  PyObject *__pyx_v_v_op = 0;
  PyObject *__pyx_v_v_all = 0;
  PyObject *__pyx_v_v_larg = 0;
  PyObject *__pyx_v_v_rarg = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SelectStmt", 0);

  /* "pglast/ast.pyx":617
 * 
 * cdef create_SelectStmt(structs.SelectStmt* data, offset_to_index):
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_intoClause = create(data.intoClause, offset_to_index) if data.intoClause is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->distinctClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 617, __pyx_L1_error)
  __pyx_v_v_distinctClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":618
 * cdef create_SelectStmt(structs.SelectStmt* data, offset_to_index):
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 *     cdef object v_intoClause = create(data.intoClause, offset_to_index) if data.intoClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 */
  if ((__pyx_v_data->intoClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->intoClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_intoClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":619
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 *     cdef object v_intoClause = create(data.intoClause, offset_to_index) if data.intoClause is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->targetList, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 619, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":620
 *     cdef object v_intoClause = create(data.intoClause, offset_to_index) if data.intoClause is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fromClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 620, __pyx_L1_error)
  __pyx_v_v_fromClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":621
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":622
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 *     cdef object v_havingClause = create(data.havingClause, offset_to_index) if data.havingClause is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->groupClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 622, __pyx_L1_error)
  __pyx_v_v_groupClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":623
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 *     cdef object v_groupDistinct = bool(data.groupDistinct)             # <<<<<<<<<<<<<<
 *     cdef object v_havingClause = create(data.havingClause, offset_to_index) if data.havingClause is not NULL else None
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->groupDistinct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_groupDistinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":624
 *     cdef tuple v_groupClause = _pg_list_to_tuple(data.groupClause, offset_to_index)
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 *     cdef object v_havingClause = create(data.havingClause, offset_to_index) if data.havingClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 *     cdef tuple v_valuesLists = _pg_list_to_tuple(data.valuesLists, offset_to_index)
 */
  if ((__pyx_v_data->havingClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->havingClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_havingClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":625
 *     cdef object v_groupDistinct = bool(data.groupDistinct)
 *     cdef object v_havingClause = create(data.havingClause, offset_to_index) if data.havingClause is not NULL else None
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_valuesLists = _pg_list_to_tuple(data.valuesLists, offset_to_index)
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->windowClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 625, __pyx_L1_error)
  __pyx_v_v_windowClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":626
 *     cdef object v_havingClause = create(data.havingClause, offset_to_index) if data.havingClause is not NULL else None
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 *     cdef tuple v_valuesLists = _pg_list_to_tuple(data.valuesLists, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->valuesLists, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 626, __pyx_L1_error)
  __pyx_v_v_valuesLists = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":627
 *     cdef tuple v_windowClause = _pg_list_to_tuple(data.windowClause, offset_to_index)
 *     cdef tuple v_valuesLists = _pg_list_to_tuple(data.valuesLists, offset_to_index)
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->sortClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 627, __pyx_L1_error)
  __pyx_v_v_sortClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":628
 *     cdef tuple v_valuesLists = _pg_list_to_tuple(data.valuesLists, offset_to_index)
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 */
  if ((__pyx_v_data->limitOffset != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_limitOffset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":629
 *     cdef tuple v_sortClause = _pg_list_to_tuple(data.sortClause, offset_to_index)
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 *     cdef tuple v_lockingClause = _pg_list_to_tuple(data.lockingClause, offset_to_index)
 */
  if ((__pyx_v_data->limitCount != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitCount, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_limitCount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":630
 *     cdef object v_limitOffset = create(data.limitOffset, offset_to_index) if data.limitOffset is not NULL else None
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)             # <<<<<<<<<<<<<<
 *     cdef tuple v_lockingClause = _pg_list_to_tuple(data.lockingClause, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_LimitOption); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_LimitOption(__pyx_v_data->limitOption); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_limitOption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":631
 *     cdef object v_limitCount = create(data.limitCount, offset_to_index) if data.limitCount is not NULL else None
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 *     cdef tuple v_lockingClause = _pg_list_to_tuple(data.lockingClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->lockingClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 631, __pyx_L1_error)
  __pyx_v_v_lockingClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":632
 *     cdef object v_limitOption = getattr(enums, 'LimitOption')(data.limitOption)
 *     cdef tuple v_lockingClause = _pg_list_to_tuple(data.lockingClause, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 *     cdef object v_all = bool(data.all)
 */
  if ((__pyx_v_data->withClause != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":633
 *     cdef tuple v_lockingClause = _pg_list_to_tuple(data.lockingClause, offset_to_index)
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)             # <<<<<<<<<<<<<<
 *     cdef object v_all = bool(data.all)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_4, __pyx_n_u_SetOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_SetOperation(__pyx_v_data->op); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":634
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 *     cdef object v_all = bool(data.all)             # <<<<<<<<<<<<<<
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->all); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_all = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":635
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 *     cdef object v_all = bool(data.all)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     return ast.SelectStmt(v_distinctClause, v_intoClause, v_targetList, v_fromClause, v_whereClause, v_groupClause, v_groupDistinct, v_havingClause, v_windowClause, v_valuesLists, v_sortClause, v_limitOffset, v_limitCount, v_limitOption, v_lockingClause, v_withClause, v_op, v_all, v_larg, v_rarg)
 */
  if ((__pyx_v_data->larg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->larg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_larg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":636
 *     cdef object v_all = bool(data.all)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.SelectStmt(v_distinctClause, v_intoClause, v_targetList, v_fromClause, v_whereClause, v_groupClause, v_groupDistinct, v_havingClause, v_windowClause, v_valuesLists, v_sortClause, v_limitOffset, v_limitCount, v_limitOption, v_lockingClause, v_withClause, v_op, v_all, v_larg, v_rarg)
 * 
 */
  if ((__pyx_v_data->rarg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rarg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rarg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":637
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     return ast.SelectStmt(v_distinctClause, v_intoClause, v_targetList, v_fromClause, v_whereClause, v_groupClause, v_groupDistinct, v_havingClause, v_windowClause, v_valuesLists, v_sortClause, v_limitOffset, v_limitCount, v_limitOption, v_lockingClause, v_withClause, v_op, v_all, v_larg, v_rarg)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SelectStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[21] = {__pyx_t_2, __pyx_v_v_distinctClause, __pyx_v_v_intoClause, __pyx_v_v_targetList, __pyx_v_v_fromClause, __pyx_v_v_whereClause, __pyx_v_v_groupClause, __pyx_v_v_groupDistinct, __pyx_v_v_havingClause, __pyx_v_v_windowClause, __pyx_v_v_valuesLists, __pyx_v_v_sortClause, __pyx_v_v_limitOffset, __pyx_v_v_limitCount, __pyx_v_v_limitOption, __pyx_v_v_lockingClause, __pyx_v_v_withClause, __pyx_v_v_op, __pyx_v_v_all, __pyx_v_v_larg, __pyx_v_v_rarg};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 20+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":616
 * 
 * 
 * cdef create_SelectStmt(structs.SelectStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_distinctClause = _pg_list_to_tuple(data.distinctClause, offset_to_index)
 *     cdef object v_intoClause = create(data.intoClause, offset_to_index) if data.intoClause is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_SelectStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_distinctClause);
  __Pyx_XDECREF(__pyx_v_v_intoClause);
  __Pyx_XDECREF(__pyx_v_v_targetList);
  __Pyx_XDECREF(__pyx_v_v_fromClause);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_groupClause);
  __Pyx_XDECREF(__pyx_v_v_groupDistinct);
  __Pyx_XDECREF(__pyx_v_v_havingClause);
  __Pyx_XDECREF(__pyx_v_v_windowClause);
  __Pyx_XDECREF(__pyx_v_v_valuesLists);
  __Pyx_XDECREF(__pyx_v_v_sortClause);
  __Pyx_XDECREF(__pyx_v_v_limitOffset);
  __Pyx_XDECREF(__pyx_v_v_limitCount);
  __Pyx_XDECREF(__pyx_v_v_limitOption);
  __Pyx_XDECREF(__pyx_v_v_lockingClause);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XDECREF(__pyx_v_v_op);
  __Pyx_XDECREF(__pyx_v_v_all);
  __Pyx_XDECREF(__pyx_v_v_larg);
  __Pyx_XDECREF(__pyx_v_v_rarg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":640
 * 
 * 
 * cdef create_SetOperationStmt(structs.SetOperationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 *     cdef object v_all = bool(data.all)
 */

static PyObject *__pyx_f_6pglast_6parser_create_SetOperationStmt(SetOperationStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_op = 0;
  PyObject *__pyx_v_v_all = 0;
  PyObject *__pyx_v_v_larg = 0;
  PyObject *__pyx_v_v_rarg = 0;
  PyObject *__pyx_v_v_colTypes = 0;
  PyObject *__pyx_v_v_colTypmods = 0;
  PyObject *__pyx_v_v_colCollations = 0;
  PyObject *__pyx_v_v_groupClauses = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SetOperationStmt", 0);

  /* "pglast/ast.pyx":641
 * 
 * cdef create_SetOperationStmt(structs.SetOperationStmt* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)             # <<<<<<<<<<<<<<
 *     cdef object v_all = bool(data.all)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_SetOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_SetOperation(__pyx_v_data->op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":642
 * cdef create_SetOperationStmt(structs.SetOperationStmt* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 *     cdef object v_all = bool(data.all)             # <<<<<<<<<<<<<<
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->all); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_all = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":643
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 *     cdef object v_all = bool(data.all)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     cdef tuple v_colTypes = _pg_list_to_tuple(data.colTypes, offset_to_index)
 */
  if ((__pyx_v_data->larg != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->larg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_larg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":644
 *     cdef object v_all = bool(data.all)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_colTypes = _pg_list_to_tuple(data.colTypes, offset_to_index)
 *     cdef tuple v_colTypmods = _pg_list_to_tuple(data.colTypmods, offset_to_index)
 */
  if ((__pyx_v_data->rarg != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rarg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rarg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":645
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     cdef tuple v_colTypes = _pg_list_to_tuple(data.colTypes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_colTypmods = _pg_list_to_tuple(data.colTypmods, offset_to_index)
 *     cdef tuple v_colCollations = _pg_list_to_tuple(data.colCollations, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colTypes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 645, __pyx_L1_error)
  __pyx_v_v_colTypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":646
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     cdef tuple v_colTypes = _pg_list_to_tuple(data.colTypes, offset_to_index)
 *     cdef tuple v_colTypmods = _pg_list_to_tuple(data.colTypmods, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_colCollations = _pg_list_to_tuple(data.colCollations, offset_to_index)
 *     cdef tuple v_groupClauses = _pg_list_to_tuple(data.groupClauses, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colTypmods, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 646, __pyx_L1_error)
  __pyx_v_v_colTypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":647
 *     cdef tuple v_colTypes = _pg_list_to_tuple(data.colTypes, offset_to_index)
 *     cdef tuple v_colTypmods = _pg_list_to_tuple(data.colTypmods, offset_to_index)
 *     cdef tuple v_colCollations = _pg_list_to_tuple(data.colCollations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_groupClauses = _pg_list_to_tuple(data.groupClauses, offset_to_index)
 *     return ast.SetOperationStmt(v_op, v_all, v_larg, v_rarg, v_colTypes, v_colTypmods, v_colCollations, v_groupClauses)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colCollations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 647, __pyx_L1_error)
  __pyx_v_v_colCollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":648
 *     cdef tuple v_colTypmods = _pg_list_to_tuple(data.colTypmods, offset_to_index)
 *     cdef tuple v_colCollations = _pg_list_to_tuple(data.colCollations, offset_to_index)
 *     cdef tuple v_groupClauses = _pg_list_to_tuple(data.groupClauses, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.SetOperationStmt(v_op, v_all, v_larg, v_rarg, v_colTypes, v_colTypmods, v_colCollations, v_groupClauses)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->groupClauses, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 648, __pyx_L1_error)
  __pyx_v_v_groupClauses = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":649
 *     cdef tuple v_colCollations = _pg_list_to_tuple(data.colCollations, offset_to_index)
 *     cdef tuple v_groupClauses = _pg_list_to_tuple(data.groupClauses, offset_to_index)
 *     return ast.SetOperationStmt(v_op, v_all, v_larg, v_rarg, v_colTypes, v_colTypmods, v_colCollations, v_groupClauses)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SetOperationStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_v_v_op, __pyx_v_v_all, __pyx_v_v_larg, __pyx_v_v_rarg, __pyx_v_v_colTypes, __pyx_v_v_colTypmods, __pyx_v_v_colCollations, __pyx_v_v_groupClauses};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 8+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __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;

  /* "pglast/ast.pyx":640
 * 
 * 
 * cdef create_SetOperationStmt(structs.SetOperationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'SetOperation')(data.op)
 *     cdef object v_all = bool(data.all)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SetOperationStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_op);
  __Pyx_XDECREF(__pyx_v_v_all);
  __Pyx_XDECREF(__pyx_v_v_larg);
  __Pyx_XDECREF(__pyx_v_v_rarg);
  __Pyx_XDECREF(__pyx_v_v_colTypes);
  __Pyx_XDECREF(__pyx_v_v_colTypmods);
  __Pyx_XDECREF(__pyx_v_v_colCollations);
  __Pyx_XDECREF(__pyx_v_v_groupClauses);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":652
 * 
 * 
 * cdef create_ReturnStmt(structs.ReturnStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_returnval = create(data.returnval, offset_to_index) if data.returnval is not NULL else None
 *     return ast.ReturnStmt(v_returnval)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ReturnStmt(ReturnStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_returnval = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReturnStmt", 0);

  /* "pglast/ast.pyx":653
 * 
 * cdef create_ReturnStmt(structs.ReturnStmt* data, offset_to_index):
 *     cdef object v_returnval = create(data.returnval, offset_to_index) if data.returnval is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.ReturnStmt(v_returnval)
 * 
 */
  if ((__pyx_v_data->returnval != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returnval, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_returnval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":654
 * cdef create_ReturnStmt(structs.ReturnStmt* data, offset_to_index):
 *     cdef object v_returnval = create(data.returnval, offset_to_index) if data.returnval is not NULL else None
 *     return ast.ReturnStmt(v_returnval)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ReturnStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_returnval};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __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;

  /* "pglast/ast.pyx":652
 * 
 * 
 * cdef create_ReturnStmt(structs.ReturnStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_returnval = create(data.returnval, offset_to_index) if data.returnval is not NULL else None
 *     return ast.ReturnStmt(v_returnval)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_ReturnStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_returnval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":657
 * 
 * 
 * cdef create_PLAssignStmt(structs.PLAssignStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_PLAssignStmt(PLAssignStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_indirection = 0;
  PyObject *__pyx_v_v_nnames = 0;
  PyObject *__pyx_v_v_val = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PLAssignStmt", 0);

  /* "pglast/ast.pyx":658
 * 
 * cdef create_PLAssignStmt(structs.PLAssignStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     cdef object v_nnames = data.nnames
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":659
 * cdef create_PLAssignStmt(structs.PLAssignStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_nnames = data.nnames
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->indirection, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 659, __pyx_L1_error)
  __pyx_v_v_indirection = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":660
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     cdef object v_nnames = data.nnames             # <<<<<<<<<<<<<<
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->nnames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nnames = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":661
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 *     cdef object v_nnames = data.nnames
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PLAssignStmt(v_name, v_indirection, v_nnames, v_val, v_location)
 */
  if ((__pyx_v_data->val != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->val, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_val = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":662
 *     cdef object v_nnames = data.nnames
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.PLAssignStmt(v_name, v_indirection, v_nnames, v_val, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":663
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PLAssignStmt(v_name, v_indirection, v_nnames, v_val, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PLAssignStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_v_name, __pyx_v_v_indirection, __pyx_v_v_nnames, __pyx_v_v_val, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 5+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __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;

  /* "pglast/ast.pyx":657
 * 
 * 
 * cdef create_PLAssignStmt(structs.PLAssignStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_indirection = _pg_list_to_tuple(data.indirection, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_PLAssignStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_indirection);
  __Pyx_XDECREF(__pyx_v_v_nnames);
  __Pyx_XDECREF(__pyx_v_v_val);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":666
 * 
 * 
 * cdef create_CreateSchemaStmt(structs.CreateSchemaStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 *     cdef object v_authrole = create(data.authrole, offset_to_index) if data.authrole is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateSchemaStmt(CreateSchemaStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_schemaname = 0;
  PyObject *__pyx_v_v_authrole = 0;
  PyObject *__pyx_v_v_schemaElts = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateSchemaStmt", 0);

  /* "pglast/ast.pyx":667
 * 
 * cdef create_CreateSchemaStmt(structs.CreateSchemaStmt* data, offset_to_index):
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_authrole = create(data.authrole, offset_to_index) if data.authrole is not NULL else None
 *     cdef tuple v_schemaElts = _pg_list_to_tuple(data.schemaElts, offset_to_index)
 */
  if ((__pyx_v_data->schemaname != NULL)) {
    __pyx_t_2 = __pyx_v_data->schemaname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_schemaname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":668
 * cdef create_CreateSchemaStmt(structs.CreateSchemaStmt* data, offset_to_index):
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 *     cdef object v_authrole = create(data.authrole, offset_to_index) if data.authrole is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_schemaElts = _pg_list_to_tuple(data.schemaElts, offset_to_index)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  if ((__pyx_v_data->authrole != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->authrole, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_authrole = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":669
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 *     cdef object v_authrole = create(data.authrole, offset_to_index) if data.authrole is not NULL else None
 *     cdef tuple v_schemaElts = _pg_list_to_tuple(data.schemaElts, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateSchemaStmt(v_schemaname, v_authrole, v_schemaElts, v_if_not_exists)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->schemaElts, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 669, __pyx_L1_error)
  __pyx_v_v_schemaElts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":670
 *     cdef object v_authrole = create(data.authrole, offset_to_index) if data.authrole is not NULL else None
 *     cdef tuple v_schemaElts = _pg_list_to_tuple(data.schemaElts, offset_to_index)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     return ast.CreateSchemaStmt(v_schemaname, v_authrole, v_schemaElts, v_if_not_exists)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":671
 *     cdef tuple v_schemaElts = _pg_list_to_tuple(data.schemaElts, offset_to_index)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateSchemaStmt(v_schemaname, v_authrole, v_schemaElts, v_if_not_exists)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateSchemaStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_schemaname, __pyx_v_v_authrole, __pyx_v_v_schemaElts, __pyx_v_v_if_not_exists};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":666
 * 
 * 
 * cdef create_CreateSchemaStmt(structs.CreateSchemaStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 *     cdef object v_authrole = create(data.authrole, offset_to_index) if data.authrole is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateSchemaStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_schemaname);
  __Pyx_XDECREF(__pyx_v_v_authrole);
  __Pyx_XDECREF(__pyx_v_v_schemaElts);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":674
 * 
 * 
 * cdef create_AlterTableStmt(structs.AlterTableStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cmds = _pg_list_to_tuple(data.cmds, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterTableStmt(AlterTableStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_cmds = 0;
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableStmt", 0);

  /* "pglast/ast.pyx":675
 * 
 * cdef create_AlterTableStmt(structs.AlterTableStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_cmds = _pg_list_to_tuple(data.cmds, offset_to_index)
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":676
 * cdef create_AlterTableStmt(structs.AlterTableStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cmds = _pg_list_to_tuple(data.cmds, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->cmds, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 676, __pyx_L1_error)
  __pyx_v_v_cmds = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":677
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cmds = _pg_list_to_tuple(data.cmds, offset_to_index)
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterTableStmt(v_relation, v_cmds, v_objtype, v_missing_ok)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":678
 *     cdef tuple v_cmds = _pg_list_to_tuple(data.cmds, offset_to_index)
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.AlterTableStmt(v_relation, v_cmds, v_objtype, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":679
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterTableStmt(v_relation, v_cmds, v_objtype, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterTableStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_cmds, __pyx_v_v_objtype, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __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;

  /* "pglast/ast.pyx":674
 * 
 * 
 * cdef create_AlterTableStmt(structs.AlterTableStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_cmds = _pg_list_to_tuple(data.cmds, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterTableStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_cmds);
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":682
 * 
 * 
 * cdef create_ReplicaIdentityStmt(structs.ReplicaIdentityStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_identity_type = chr(data.identity_type)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_ReplicaIdentityStmt(ReplicaIdentityStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_identity_type = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReplicaIdentityStmt", 0);

  /* "pglast/ast.pyx":683
 * 
 * cdef create_ReplicaIdentityStmt(structs.ReplicaIdentityStmt* data, offset_to_index):
 *     cdef object v_identity_type = chr(data.identity_type)             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.ReplicaIdentityStmt(v_identity_type, v_name)
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->identity_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_identity_type = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":684
 * cdef create_ReplicaIdentityStmt(structs.ReplicaIdentityStmt* data, offset_to_index):
 *     cdef object v_identity_type = chr(data.identity_type)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.ReplicaIdentityStmt(v_identity_type, v_name)
 * 
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":685
 *     cdef object v_identity_type = chr(data.identity_type)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.ReplicaIdentityStmt(v_identity_type, v_name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ReplicaIdentityStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_v_identity_type, __pyx_v_v_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":682
 * 
 * 
 * cdef create_ReplicaIdentityStmt(structs.ReplicaIdentityStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_identity_type = chr(data.identity_type)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ReplicaIdentityStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_identity_type);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":688
 * 
 * 
 * cdef create_AlterTableCmd(structs.AlterTableCmd* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subtype = getattr(enums, 'AlterTableType')(data.subtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterTableCmd(AlterTableCmd *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_subtype = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_num = 0;
  PyObject *__pyx_v_v_newowner = 0;
  PyObject *__pyx_v_v_def_ = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_v_v_recurse = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableCmd", 0);

  /* "pglast/ast.pyx":689
 * 
 * cdef create_AlterTableCmd(structs.AlterTableCmd* data, offset_to_index):
 *     cdef object v_subtype = getattr(enums, 'AlterTableType')(data.subtype)             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_num = data.num
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_AlterTableType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_AlterTableType(__pyx_v_data->subtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_subtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":690
 * cdef create_AlterTableCmd(structs.AlterTableCmd* data, offset_to_index):
 *     cdef object v_subtype = getattr(enums, 'AlterTableType')(data.subtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_num = data.num
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_6 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":691
 *     cdef object v_subtype = getattr(enums, 'AlterTableType')(data.subtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_num = data.num             # <<<<<<<<<<<<<<
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_int16_t(__pyx_v_data->num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_num = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":692
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_num = data.num
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  if ((__pyx_v_data->newowner != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->newowner, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_newowner = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":693
 *     cdef object v_num = data.num
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  if ((__pyx_v_data->def != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->def, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_def_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":694
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_recurse = bool(data.recurse)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":695
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     cdef object v_recurse = bool(data.recurse)
 *     return ast.AlterTableCmd(v_subtype, v_name, v_num, v_newowner, v_def_, v_behavior, v_missing_ok, v_recurse)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":696
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_recurse = bool(data.recurse)             # <<<<<<<<<<<<<<
 *     return ast.AlterTableCmd(v_subtype, v_name, v_num, v_newowner, v_def_, v_behavior, v_missing_ok, v_recurse)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->recurse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_recurse = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":697
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_recurse = bool(data.recurse)
 *     return ast.AlterTableCmd(v_subtype, v_name, v_num, v_newowner, v_def_, v_behavior, v_missing_ok, v_recurse)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterTableCmd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_2, __pyx_v_v_subtype, __pyx_v_v_name, __pyx_v_v_num, __pyx_v_v_newowner, __pyx_v_v_def_, __pyx_v_v_behavior, __pyx_v_v_missing_ok, __pyx_v_v_recurse};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 8+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __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;

  /* "pglast/ast.pyx":688
 * 
 * 
 * cdef create_AlterTableCmd(structs.AlterTableCmd* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subtype = getattr(enums, 'AlterTableType')(data.subtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterTableCmd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_subtype);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_num);
  __Pyx_XDECREF(__pyx_v_v_newowner);
  __Pyx_XDECREF(__pyx_v_v_def_);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XDECREF(__pyx_v_v_recurse);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":700
 * 
 * 
 * cdef create_AlterCollationStmt(structs.AlterCollationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 *     return ast.AlterCollationStmt(v_collname)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterCollationStmt(AlterCollationStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_collname = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterCollationStmt", 0);

  /* "pglast/ast.pyx":701
 * 
 * cdef create_AlterCollationStmt(structs.AlterCollationStmt* data, offset_to_index):
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterCollationStmt(v_collname)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->collname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 701, __pyx_L1_error)
  __pyx_v_v_collname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":702
 * cdef create_AlterCollationStmt(structs.AlterCollationStmt* data, offset_to_index):
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 *     return ast.AlterCollationStmt(v_collname)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterCollationStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_collname};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __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;

  /* "pglast/ast.pyx":700
 * 
 * 
 * cdef create_AlterCollationStmt(structs.AlterCollationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_collname = _pg_list_to_tuple(data.collname, offset_to_index)
 *     return ast.AlterCollationStmt(v_collname)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlterCollationStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_collname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":705
 * 
 * 
 * cdef create_AlterDomainStmt(structs.AlterDomainStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subtype = chr(data.subtype)
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterDomainStmt(AlterDomainStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_subtype = 0;
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_def_ = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDomainStmt", 0);

  /* "pglast/ast.pyx":706
 * 
 * cdef create_AlterDomainStmt(structs.AlterDomainStmt* data, offset_to_index):
 *     cdef object v_subtype = chr(data.subtype)             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->subtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_subtype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":707
 * cdef create_AlterDomainStmt(structs.AlterDomainStmt* data, offset_to_index):
 *     cdef object v_subtype = chr(data.subtype)
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 707, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":708
 *     cdef object v_subtype = chr(data.subtype)
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":709
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  if ((__pyx_v_data->def != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->def, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_def_ = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":710
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterDomainStmt(v_subtype, v_typeName, v_name, v_def_, v_behavior, v_missing_ok)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_enums); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_1, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":711
 *     cdef object v_def_ = create(data.def_, offset_to_index) if data.def_ is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.AlterDomainStmt(v_subtype, v_typeName, v_name, v_def_, v_behavior, v_missing_ok)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_missing_ok = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":712
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterDomainStmt(v_subtype, v_typeName, v_name, v_def_, v_behavior, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_AlterDomainStmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_subtype, __pyx_v_v_typeName, __pyx_v_v_name, __pyx_v_v_def_, __pyx_v_v_behavior, __pyx_v_v_missing_ok};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __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;

  /* "pglast/ast.pyx":705
 * 
 * 
 * cdef create_AlterDomainStmt(structs.AlterDomainStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subtype = chr(data.subtype)
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_AlterDomainStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_subtype);
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_def_);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":715
 * 
 * 
 * cdef create_GrantStmt(structs.GrantStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef object v_targtype = getattr(enums, 'GrantTargetType')(data.targtype)
 */

static PyObject *__pyx_f_6pglast_6parser_create_GrantStmt(GrantStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_is_grant = 0;
  PyObject *__pyx_v_v_targtype = 0;
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_objects = 0;
  PyObject *__pyx_v_v_privileges = 0;
  PyObject *__pyx_v_v_grantees = 0;
  PyObject *__pyx_v_v_grant_option = 0;
  PyObject *__pyx_v_v_grantor = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_GrantStmt", 0);

  /* "pglast/ast.pyx":716
 * 
 * cdef create_GrantStmt(structs.GrantStmt* data, offset_to_index):
 *     cdef object v_is_grant = bool(data.is_grant)             # <<<<<<<<<<<<<<
 *     cdef object v_targtype = getattr(enums, 'GrantTargetType')(data.targtype)
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_grant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_grant = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":717
 * cdef create_GrantStmt(structs.GrantStmt* data, offset_to_index):
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef object v_targtype = getattr(enums, 'GrantTargetType')(data.targtype)             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_GrantTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_GrantTargetType(__pyx_v_data->targtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_targtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":718
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef object v_targtype = getattr(enums, 'GrantTargetType')(data.targtype)
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 *     cdef tuple v_privileges = _pg_list_to_tuple(data.privileges, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_4, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":719
 *     cdef object v_targtype = getattr(enums, 'GrantTargetType')(data.targtype)
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_privileges = _pg_list_to_tuple(data.privileges, offset_to_index)
 *     cdef tuple v_grantees = _pg_list_to_tuple(data.grantees, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->objects, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 719, __pyx_L1_error)
  __pyx_v_v_objects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":720
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 *     cdef tuple v_privileges = _pg_list_to_tuple(data.privileges, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_grantees = _pg_list_to_tuple(data.grantees, offset_to_index)
 *     cdef object v_grant_option = bool(data.grant_option)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->privileges, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 720, __pyx_L1_error)
  __pyx_v_v_privileges = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":721
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 *     cdef tuple v_privileges = _pg_list_to_tuple(data.privileges, offset_to_index)
 *     cdef tuple v_grantees = _pg_list_to_tuple(data.grantees, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_grant_option = bool(data.grant_option)
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->grantees, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 721, __pyx_L1_error)
  __pyx_v_v_grantees = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":722
 *     cdef tuple v_privileges = _pg_list_to_tuple(data.privileges, offset_to_index)
 *     cdef tuple v_grantees = _pg_list_to_tuple(data.grantees, offset_to_index)
 *     cdef object v_grant_option = bool(data.grant_option)             # <<<<<<<<<<<<<<
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->grant_option); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_grant_option = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":723
 *     cdef tuple v_grantees = _pg_list_to_tuple(data.grantees, offset_to_index)
 *     cdef object v_grant_option = bool(data.grant_option)
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.GrantStmt(v_is_grant, v_targtype, v_objtype, v_objects, v_privileges, v_grantees, v_grant_option, v_grantor, v_behavior)
 */
  if ((__pyx_v_data->grantor != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->grantor, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_grantor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":724
 *     cdef object v_grant_option = bool(data.grant_option)
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     return ast.GrantStmt(v_is_grant, v_targtype, v_objtype, v_objects, v_privileges, v_grantees, v_grant_option, v_grantor, v_behavior)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":725
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.GrantStmt(v_is_grant, v_targtype, v_objtype, v_objects, v_privileges, v_grantees, v_grant_option, v_grantor, v_behavior)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_GrantStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[10] = {__pyx_t_4, __pyx_v_v_is_grant, __pyx_v_v_targtype, __pyx_v_v_objtype, __pyx_v_v_objects, __pyx_v_v_privileges, __pyx_v_v_grantees, __pyx_v_v_grant_option, __pyx_v_v_grantor, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 9+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __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;

  /* "pglast/ast.pyx":715
 * 
 * 
 * cdef create_GrantStmt(structs.GrantStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef object v_targtype = getattr(enums, 'GrantTargetType')(data.targtype)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_GrantStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_is_grant);
  __Pyx_XDECREF(__pyx_v_v_targtype);
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_objects);
  __Pyx_XDECREF(__pyx_v_v_privileges);
  __Pyx_XDECREF(__pyx_v_v_grantees);
  __Pyx_XDECREF(__pyx_v_v_grant_option);
  __Pyx_XDECREF(__pyx_v_v_grantor);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":728
 * 
 * 
 * cdef create_ObjectWithArgs(structs.ObjectWithArgs* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_objname = _pg_list_to_tuple(data.objname, offset_to_index)
 *     cdef tuple v_objargs = _pg_list_to_tuple(data.objargs, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ObjectWithArgs(ObjectWithArgs *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objname = 0;
  PyObject *__pyx_v_v_objargs = 0;
  PyObject *__pyx_v_v_objfuncargs = 0;
  PyObject *__pyx_v_v_args_unspecified = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ObjectWithArgs", 0);

  /* "pglast/ast.pyx":729
 * 
 * cdef create_ObjectWithArgs(structs.ObjectWithArgs* data, offset_to_index):
 *     cdef tuple v_objname = _pg_list_to_tuple(data.objname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_objargs = _pg_list_to_tuple(data.objargs, offset_to_index)
 *     cdef tuple v_objfuncargs = _pg_list_to_tuple(data.objfuncargs, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->objname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 729, __pyx_L1_error)
  __pyx_v_v_objname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":730
 * cdef create_ObjectWithArgs(structs.ObjectWithArgs* data, offset_to_index):
 *     cdef tuple v_objname = _pg_list_to_tuple(data.objname, offset_to_index)
 *     cdef tuple v_objargs = _pg_list_to_tuple(data.objargs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_objfuncargs = _pg_list_to_tuple(data.objfuncargs, offset_to_index)
 *     cdef object v_args_unspecified = bool(data.args_unspecified)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->objargs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 730, __pyx_L1_error)
  __pyx_v_v_objargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":731
 *     cdef tuple v_objname = _pg_list_to_tuple(data.objname, offset_to_index)
 *     cdef tuple v_objargs = _pg_list_to_tuple(data.objargs, offset_to_index)
 *     cdef tuple v_objfuncargs = _pg_list_to_tuple(data.objfuncargs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_args_unspecified = bool(data.args_unspecified)
 *     return ast.ObjectWithArgs(v_objname, v_objargs, v_objfuncargs, v_args_unspecified)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->objfuncargs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 731, __pyx_L1_error)
  __pyx_v_v_objfuncargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":732
 *     cdef tuple v_objargs = _pg_list_to_tuple(data.objargs, offset_to_index)
 *     cdef tuple v_objfuncargs = _pg_list_to_tuple(data.objfuncargs, offset_to_index)
 *     cdef object v_args_unspecified = bool(data.args_unspecified)             # <<<<<<<<<<<<<<
 *     return ast.ObjectWithArgs(v_objname, v_objargs, v_objfuncargs, v_args_unspecified)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->args_unspecified); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_args_unspecified = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":733
 *     cdef tuple v_objfuncargs = _pg_list_to_tuple(data.objfuncargs, offset_to_index)
 *     cdef object v_args_unspecified = bool(data.args_unspecified)
 *     return ast.ObjectWithArgs(v_objname, v_objargs, v_objfuncargs, v_args_unspecified)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ObjectWithArgs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_objname, __pyx_v_v_objargs, __pyx_v_v_objfuncargs, __pyx_v_v_args_unspecified};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":728
 * 
 * 
 * cdef create_ObjectWithArgs(structs.ObjectWithArgs* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_objname = _pg_list_to_tuple(data.objname, offset_to_index)
 *     cdef tuple v_objargs = _pg_list_to_tuple(data.objargs, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ObjectWithArgs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objname);
  __Pyx_XDECREF(__pyx_v_v_objargs);
  __Pyx_XDECREF(__pyx_v_v_objfuncargs);
  __Pyx_XDECREF(__pyx_v_v_args_unspecified);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":736
 * 
 * 
 * cdef create_AccessPriv(structs.AccessPriv* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_priv_name = data.priv_name.decode("utf-8") if data.priv_name is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AccessPriv(AccessPriv *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_priv_name = 0;
  PyObject *__pyx_v_v_cols = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AccessPriv", 0);

  /* "pglast/ast.pyx":737
 * 
 * cdef create_AccessPriv(structs.AccessPriv* data, offset_to_index):
 *     cdef object v_priv_name = data.priv_name.decode("utf-8") if data.priv_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     return ast.AccessPriv(v_priv_name, v_cols)
 */
  if ((__pyx_v_data->priv_name != NULL)) {
    __pyx_t_2 = __pyx_v_data->priv_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_priv_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":738
 * cdef create_AccessPriv(structs.AccessPriv* data, offset_to_index):
 *     cdef object v_priv_name = data.priv_name.decode("utf-8") if data.priv_name is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AccessPriv(v_priv_name, v_cols)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->cols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 738, __pyx_L1_error)
  __pyx_v_v_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":739
 *     cdef object v_priv_name = data.priv_name.decode("utf-8") if data.priv_name is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     return ast.AccessPriv(v_priv_name, v_cols)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AccessPriv); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_priv_name, __pyx_v_v_cols};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":736
 * 
 * 
 * cdef create_AccessPriv(structs.AccessPriv* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_priv_name = data.priv_name.decode("utf-8") if data.priv_name is not NULL else None
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AccessPriv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_priv_name);
  __Pyx_XDECREF(__pyx_v_v_cols);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":742
 * 
 * 
 * cdef create_GrantRoleStmt(structs.GrantRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_granted_roles = _pg_list_to_tuple(data.granted_roles, offset_to_index)
 *     cdef tuple v_grantee_roles = _pg_list_to_tuple(data.grantee_roles, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_GrantRoleStmt(GrantRoleStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_granted_roles = 0;
  PyObject *__pyx_v_v_grantee_roles = 0;
  PyObject *__pyx_v_v_is_grant = 0;
  PyObject *__pyx_v_v_admin_opt = 0;
  PyObject *__pyx_v_v_grantor = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_GrantRoleStmt", 0);

  /* "pglast/ast.pyx":743
 * 
 * cdef create_GrantRoleStmt(structs.GrantRoleStmt* data, offset_to_index):
 *     cdef tuple v_granted_roles = _pg_list_to_tuple(data.granted_roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_grantee_roles = _pg_list_to_tuple(data.grantee_roles, offset_to_index)
 *     cdef object v_is_grant = bool(data.is_grant)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->granted_roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 743, __pyx_L1_error)
  __pyx_v_v_granted_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":744
 * cdef create_GrantRoleStmt(structs.GrantRoleStmt* data, offset_to_index):
 *     cdef tuple v_granted_roles = _pg_list_to_tuple(data.granted_roles, offset_to_index)
 *     cdef tuple v_grantee_roles = _pg_list_to_tuple(data.grantee_roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef object v_admin_opt = bool(data.admin_opt)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->grantee_roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 744, __pyx_L1_error)
  __pyx_v_v_grantee_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":745
 *     cdef tuple v_granted_roles = _pg_list_to_tuple(data.granted_roles, offset_to_index)
 *     cdef tuple v_grantee_roles = _pg_list_to_tuple(data.grantee_roles, offset_to_index)
 *     cdef object v_is_grant = bool(data.is_grant)             # <<<<<<<<<<<<<<
 *     cdef object v_admin_opt = bool(data.admin_opt)
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_grant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_grant = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":746
 *     cdef tuple v_grantee_roles = _pg_list_to_tuple(data.grantee_roles, offset_to_index)
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef object v_admin_opt = bool(data.admin_opt)             # <<<<<<<<<<<<<<
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->admin_opt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_admin_opt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":747
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef object v_admin_opt = bool(data.admin_opt)
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.GrantRoleStmt(v_granted_roles, v_grantee_roles, v_is_grant, v_admin_opt, v_grantor, v_behavior)
 */
  if ((__pyx_v_data->grantor != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->grantor, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_grantor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":748
 *     cdef object v_admin_opt = bool(data.admin_opt)
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     return ast.GrantRoleStmt(v_granted_roles, v_grantee_roles, v_is_grant, v_admin_opt, v_grantor, v_behavior)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":749
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.GrantRoleStmt(v_granted_roles, v_grantee_roles, v_is_grant, v_admin_opt, v_grantor, v_behavior)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_GrantRoleStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_granted_roles, __pyx_v_v_grantee_roles, __pyx_v_v_is_grant, __pyx_v_v_admin_opt, __pyx_v_v_grantor, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __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;

  /* "pglast/ast.pyx":742
 * 
 * 
 * cdef create_GrantRoleStmt(structs.GrantRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_granted_roles = _pg_list_to_tuple(data.granted_roles, offset_to_index)
 *     cdef tuple v_grantee_roles = _pg_list_to_tuple(data.grantee_roles, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_GrantRoleStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_granted_roles);
  __Pyx_XDECREF(__pyx_v_v_grantee_roles);
  __Pyx_XDECREF(__pyx_v_v_is_grant);
  __Pyx_XDECREF(__pyx_v_v_admin_opt);
  __Pyx_XDECREF(__pyx_v_v_grantor);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":752
 * 
 * 
 * cdef create_AlterDefaultPrivilegesStmt(structs.AlterDefaultPrivilegesStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_action = create(data.action, offset_to_index) if data.action is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterDefaultPrivilegesStmt(AlterDefaultPrivilegesStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_action = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDefaultPrivilegesStmt", 0);

  /* "pglast/ast.pyx":753
 * 
 * cdef create_AlterDefaultPrivilegesStmt(structs.AlterDefaultPrivilegesStmt* data, offset_to_index):
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_action = create(data.action, offset_to_index) if data.action is not NULL else None
 *     return ast.AlterDefaultPrivilegesStmt(v_options, v_action)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 753, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":754
 * cdef create_AlterDefaultPrivilegesStmt(structs.AlterDefaultPrivilegesStmt* data, offset_to_index):
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_action = create(data.action, offset_to_index) if data.action is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterDefaultPrivilegesStmt(v_options, v_action)
 * 
 */
  if ((__pyx_v_data->action != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->action, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":755
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_action = create(data.action, offset_to_index) if data.action is not NULL else None
 *     return ast.AlterDefaultPrivilegesStmt(v_options, v_action)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterDefaultPrivilegesStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_options, __pyx_v_v_action};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __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;

  /* "pglast/ast.pyx":752
 * 
 * 
 * cdef create_AlterDefaultPrivilegesStmt(structs.AlterDefaultPrivilegesStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_action = create(data.action, offset_to_index) if data.action is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlterDefaultPrivilegesStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_action);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":758
 * 
 * 
 * cdef create_CopyStmt(structs.CopyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CopyStmt(CopyStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_query = 0;
  PyObject *__pyx_v_v_attlist = 0;
  PyObject *__pyx_v_v_is_from = 0;
  PyObject *__pyx_v_v_is_program = 0;
  PyObject *__pyx_v_v_filename = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CopyStmt", 0);

  /* "pglast/ast.pyx":759
 * 
 * cdef create_CopyStmt(structs.CopyStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef tuple v_attlist = _pg_list_to_tuple(data.attlist, offset_to_index)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":760
 * cdef create_CopyStmt(structs.CopyStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_attlist = _pg_list_to_tuple(data.attlist, offset_to_index)
 *     cdef object v_is_from = bool(data.is_from)
 */
  if ((__pyx_v_data->query != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_query = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":761
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef tuple v_attlist = _pg_list_to_tuple(data.attlist, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_is_from = bool(data.is_from)
 *     cdef object v_is_program = bool(data.is_program)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->attlist, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 761, __pyx_L1_error)
  __pyx_v_v_attlist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":762
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef tuple v_attlist = _pg_list_to_tuple(data.attlist, offset_to_index)
 *     cdef object v_is_from = bool(data.is_from)             # <<<<<<<<<<<<<<
 *     cdef object v_is_program = bool(data.is_program)
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_from = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":763
 *     cdef tuple v_attlist = _pg_list_to_tuple(data.attlist, offset_to_index)
 *     cdef object v_is_from = bool(data.is_from)
 *     cdef object v_is_program = bool(data.is_program)             # <<<<<<<<<<<<<<
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_program); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_program = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":764
 *     cdef object v_is_from = bool(data.is_from)
 *     cdef object v_is_program = bool(data.is_program)
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */
  if ((__pyx_v_data->filename != NULL)) {
    __pyx_t_4 = __pyx_v_data->filename;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_filename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":765
 *     cdef object v_is_program = bool(data.is_program)
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     return ast.CopyStmt(v_relation, v_query, v_attlist, v_is_from, v_is_program, v_filename, v_options, v_whereClause)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 765, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":766
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CopyStmt(v_relation, v_query, v_attlist, v_is_from, v_is_program, v_filename, v_options, v_whereClause)
 * 
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":767
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     return ast.CopyStmt(v_relation, v_query, v_attlist, v_is_from, v_is_program, v_filename, v_options, v_whereClause)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CopyStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_query, __pyx_v_v_attlist, __pyx_v_v_is_from, __pyx_v_v_is_program, __pyx_v_v_filename, __pyx_v_v_options, __pyx_v_v_whereClause};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 8+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":758
 * 
 * 
 * cdef create_CopyStmt(structs.CopyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CopyStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_query);
  __Pyx_XDECREF(__pyx_v_v_attlist);
  __Pyx_XDECREF(__pyx_v_v_is_from);
  __Pyx_XDECREF(__pyx_v_v_is_program);
  __Pyx_XDECREF(__pyx_v_v_filename);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":770
 * 
 * 
 * cdef create_VariableSetStmt(structs.VariableSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'VariableSetKind')(data.kind)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_VariableSetStmt(VariableSetStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_is_local = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VariableSetStmt", 0);

  /* "pglast/ast.pyx":771
 * 
 * cdef create_VariableSetStmt(structs.VariableSetStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'VariableSetKind')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_VariableSetKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_VariableSetKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":772
 * cdef create_VariableSetStmt(structs.VariableSetStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'VariableSetKind')(data.kind)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_is_local = bool(data.is_local)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_6 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":773
 *     cdef object v_kind = getattr(enums, 'VariableSetKind')(data.kind)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_is_local = bool(data.is_local)
 *     return ast.VariableSetStmt(v_kind, v_name, v_args, v_is_local)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 773, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":774
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_is_local = bool(data.is_local)             # <<<<<<<<<<<<<<
 *     return ast.VariableSetStmt(v_kind, v_name, v_args, v_is_local)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_local); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_local = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":775
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_is_local = bool(data.is_local)
 *     return ast.VariableSetStmt(v_kind, v_name, v_args, v_is_local)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VariableSetStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_name, __pyx_v_v_args, __pyx_v_v_is_local};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __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;

  /* "pglast/ast.pyx":770
 * 
 * 
 * cdef create_VariableSetStmt(structs.VariableSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'VariableSetKind')(data.kind)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_VariableSetStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_is_local);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":778
 * 
 * 
 * cdef create_VariableShowStmt(structs.VariableShowStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.VariableShowStmt(v_name)
 */

static PyObject *__pyx_f_6pglast_6parser_create_VariableShowStmt(VariableShowStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VariableShowStmt", 0);

  /* "pglast/ast.pyx":779
 * 
 * cdef create_VariableShowStmt(structs.VariableShowStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.VariableShowStmt(v_name)
 * 
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":780
 * cdef create_VariableShowStmt(structs.VariableShowStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.VariableShowStmt(v_name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VariableShowStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":778
 * 
 * 
 * cdef create_VariableShowStmt(structs.VariableShowStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.VariableShowStmt(v_name)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_VariableShowStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":783
 * 
 * 
 * cdef create_CreateStmt(structs.CreateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_tableElts = _pg_list_to_tuple(data.tableElts, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateStmt(CreateStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_tableElts = 0;
  PyObject *__pyx_v_v_inhRelations = 0;
  PyObject *__pyx_v_v_partbound = 0;
  PyObject *__pyx_v_v_partspec = 0;
  PyObject *__pyx_v_v_ofTypename = 0;
  PyObject *__pyx_v_v_constraints = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_oncommit = 0;
  PyObject *__pyx_v_v_tablespacename = 0;
  PyObject *__pyx_v_v_accessMethod = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateStmt", 0);

  /* "pglast/ast.pyx":784
 * 
 * cdef create_CreateStmt(structs.CreateStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_tableElts = _pg_list_to_tuple(data.tableElts, offset_to_index)
 *     cdef tuple v_inhRelations = _pg_list_to_tuple(data.inhRelations, offset_to_index)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":785
 * cdef create_CreateStmt(structs.CreateStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_tableElts = _pg_list_to_tuple(data.tableElts, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_inhRelations = _pg_list_to_tuple(data.inhRelations, offset_to_index)
 *     cdef object v_partbound = create(data.partbound, offset_to_index) if data.partbound is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->tableElts, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 785, __pyx_L1_error)
  __pyx_v_v_tableElts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":786
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_tableElts = _pg_list_to_tuple(data.tableElts, offset_to_index)
 *     cdef tuple v_inhRelations = _pg_list_to_tuple(data.inhRelations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_partbound = create(data.partbound, offset_to_index) if data.partbound is not NULL else None
 *     cdef object v_partspec = create(data.partspec, offset_to_index) if data.partspec is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->inhRelations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 786, __pyx_L1_error)
  __pyx_v_v_inhRelations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":787
 *     cdef tuple v_tableElts = _pg_list_to_tuple(data.tableElts, offset_to_index)
 *     cdef tuple v_inhRelations = _pg_list_to_tuple(data.inhRelations, offset_to_index)
 *     cdef object v_partbound = create(data.partbound, offset_to_index) if data.partbound is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_partspec = create(data.partspec, offset_to_index) if data.partspec is not NULL else None
 *     cdef object v_ofTypename = create(data.ofTypename, offset_to_index) if data.ofTypename is not NULL else None
 */
  if ((__pyx_v_data->partbound != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->partbound, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_partbound = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":788
 *     cdef tuple v_inhRelations = _pg_list_to_tuple(data.inhRelations, offset_to_index)
 *     cdef object v_partbound = create(data.partbound, offset_to_index) if data.partbound is not NULL else None
 *     cdef object v_partspec = create(data.partspec, offset_to_index) if data.partspec is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_ofTypename = create(data.ofTypename, offset_to_index) if data.ofTypename is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 */
  if ((__pyx_v_data->partspec != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->partspec, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_partspec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":789
 *     cdef object v_partbound = create(data.partbound, offset_to_index) if data.partbound is not NULL else None
 *     cdef object v_partspec = create(data.partspec, offset_to_index) if data.partspec is not NULL else None
 *     cdef object v_ofTypename = create(data.ofTypename, offset_to_index) if data.ofTypename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->ofTypename != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->ofTypename, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_ofTypename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":790
 *     cdef object v_partspec = create(data.partspec, offset_to_index) if data.partspec is not NULL else None
 *     cdef object v_ofTypename = create(data.ofTypename, offset_to_index) if data.ofTypename is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_oncommit = getattr(enums, 'OnCommitAction')(data.oncommit)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->constraints, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 790, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":791
 *     cdef object v_ofTypename = create(data.ofTypename, offset_to_index) if data.ofTypename is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_oncommit = getattr(enums, 'OnCommitAction')(data.oncommit)
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":792
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_oncommit = getattr(enums, 'OnCommitAction')(data.oncommit)             # <<<<<<<<<<<<<<
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_OnCommitAction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_OnCommitAction(__pyx_v_data->oncommit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_oncommit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":793
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_oncommit = getattr(enums, 'OnCommitAction')(data.oncommit)
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  if ((__pyx_v_data->tablespacename != NULL)) {
    __pyx_t_6 = __pyx_v_data->tablespacename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tablespacename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":794
 *     cdef object v_oncommit = getattr(enums, 'OnCommitAction')(data.oncommit)
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateStmt(v_relation, v_tableElts, v_inhRelations, v_partbound, v_partspec, v_ofTypename, v_constraints, v_options, v_oncommit, v_tablespacename, v_accessMethod, v_if_not_exists)
 */
  if ((__pyx_v_data->accessMethod != NULL)) {
    __pyx_t_7 = __pyx_v_data->accessMethod;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_accessMethod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":795
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     return ast.CreateStmt(v_relation, v_tableElts, v_inhRelations, v_partbound, v_partspec, v_ofTypename, v_constraints, v_options, v_oncommit, v_tablespacename, v_accessMethod, v_if_not_exists)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":796
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateStmt(v_relation, v_tableElts, v_inhRelations, v_partbound, v_partspec, v_ofTypename, v_constraints, v_options, v_oncommit, v_tablespacename, v_accessMethod, v_if_not_exists)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[13] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_tableElts, __pyx_v_v_inhRelations, __pyx_v_v_partbound, __pyx_v_v_partspec, __pyx_v_v_ofTypename, __pyx_v_v_constraints, __pyx_v_v_options, __pyx_v_v_oncommit, __pyx_v_v_tablespacename, __pyx_v_v_accessMethod, __pyx_v_v_if_not_exists};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 12+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":783
 * 
 * 
 * cdef create_CreateStmt(structs.CreateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_tableElts = _pg_list_to_tuple(data.tableElts, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_tableElts);
  __Pyx_XDECREF(__pyx_v_v_inhRelations);
  __Pyx_XDECREF(__pyx_v_v_partbound);
  __Pyx_XDECREF(__pyx_v_v_partspec);
  __Pyx_XDECREF(__pyx_v_v_ofTypename);
  __Pyx_XDECREF(__pyx_v_v_constraints);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_oncommit);
  __Pyx_XDECREF(__pyx_v_v_tablespacename);
  __Pyx_XDECREF(__pyx_v_v_accessMethod);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":799
 * 
 * 
 * cdef create_Constraint(structs.Constraint* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_contype = getattr(enums, 'ConstrType')(data.contype)
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_Constraint(Constraint *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_contype = 0;
  PyObject *__pyx_v_v_conname = 0;
  PyObject *__pyx_v_v_deferrable = 0;
  PyObject *__pyx_v_v_initdeferred = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_v_v_is_no_inherit = 0;
  PyObject *__pyx_v_v_raw_expr = 0;
  PyObject *__pyx_v_v_cooked_expr = 0;
  PyObject *__pyx_v_v_generated_when = 0;
  PyObject *__pyx_v_v_nulls_not_distinct = 0;
  PyObject *__pyx_v_v_keys = 0;
  PyObject *__pyx_v_v_including = 0;
  PyObject *__pyx_v_v_exclusions = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_indexname = 0;
  PyObject *__pyx_v_v_indexspace = 0;
  PyObject *__pyx_v_v_reset_default_tblspc = 0;
  PyObject *__pyx_v_v_access_method = 0;
  PyObject *__pyx_v_v_where_clause = 0;
  PyObject *__pyx_v_v_pktable = 0;
  PyObject *__pyx_v_v_fk_attrs = 0;
  PyObject *__pyx_v_v_pk_attrs = 0;
  PyObject *__pyx_v_v_fk_matchtype = 0;
  PyObject *__pyx_v_v_fk_upd_action = 0;
  PyObject *__pyx_v_v_fk_del_action = 0;
  PyObject *__pyx_v_v_fk_del_set_cols = 0;
  PyObject *__pyx_v_v_old_conpfeqop = 0;
  PyObject *__pyx_v_v_skip_validation = 0;
  PyObject *__pyx_v_v_initially_valid = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  char const *__pyx_t_9;
  char const *__pyx_t_10;
  char const *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Constraint", 0);

  /* "pglast/ast.pyx":800
 * 
 * cdef create_Constraint(structs.Constraint* data, offset_to_index):
 *     cdef object v_contype = getattr(enums, 'ConstrType')(data.contype)             # <<<<<<<<<<<<<<
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_deferrable = bool(data.deferrable)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ConstrType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ConstrType(__pyx_v_data->contype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_contype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":801
 * cdef create_Constraint(structs.Constraint* data, offset_to_index):
 *     cdef object v_contype = getattr(enums, 'ConstrType')(data.contype)
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 */
  if ((__pyx_v_data->conname != NULL)) {
    __pyx_t_6 = __pyx_v_data->conname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_conname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":802
 *     cdef object v_contype = getattr(enums, 'ConstrType')(data.contype)
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_deferrable = bool(data.deferrable)             # <<<<<<<<<<<<<<
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->deferrable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferrable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":803
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_is_no_inherit = bool(data.is_no_inherit)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->initdeferred); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initdeferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":804
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     cdef object v_is_no_inherit = bool(data.is_no_inherit)
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":805
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_is_no_inherit = bool(data.is_no_inherit)             # <<<<<<<<<<<<<<
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 *     cdef object v_cooked_expr = data.cooked_expr.decode("utf-8") if data.cooked_expr is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_no_inherit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_no_inherit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":806
 *     cdef object v_location = offset_to_index(data.location)
 *     cdef object v_is_no_inherit = bool(data.is_no_inherit)
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cooked_expr = data.cooked_expr.decode("utf-8") if data.cooked_expr is not NULL else None
 *     cdef object v_generated_when = chr(data.generated_when)
 */
  if ((__pyx_v_data->raw_expr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->raw_expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_raw_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":807
 *     cdef object v_is_no_inherit = bool(data.is_no_inherit)
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 *     cdef object v_cooked_expr = data.cooked_expr.decode("utf-8") if data.cooked_expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_generated_when = chr(data.generated_when)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 */
  if ((__pyx_v_data->cooked_expr != NULL)) {
    __pyx_t_8 = __pyx_v_data->cooked_expr;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_8, 0, strlen(__pyx_t_8), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cooked_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":808
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 *     cdef object v_cooked_expr = data.cooked_expr.decode("utf-8") if data.cooked_expr is not NULL else None
 *     cdef object v_generated_when = chr(data.generated_when)             # <<<<<<<<<<<<<<
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 *     cdef tuple v_keys = _pg_list_to_tuple(data.keys, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->generated_when); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_generated_when = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":809
 *     cdef object v_cooked_expr = data.cooked_expr.decode("utf-8") if data.cooked_expr is not NULL else None
 *     cdef object v_generated_when = chr(data.generated_when)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)             # <<<<<<<<<<<<<<
 *     cdef tuple v_keys = _pg_list_to_tuple(data.keys, offset_to_index)
 *     cdef tuple v_including = _pg_list_to_tuple(data.including, offset_to_index)
 */
  __pyx_t_2 = __Pyx_PyInt_From_bool(__pyx_v_data->nulls_not_distinct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_nulls_not_distinct = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":810
 *     cdef object v_generated_when = chr(data.generated_when)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 *     cdef tuple v_keys = _pg_list_to_tuple(data.keys, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_including = _pg_list_to_tuple(data.including, offset_to_index)
 *     cdef tuple v_exclusions = _pg_list_to_tuple(data.exclusions, offset_to_index)
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->keys, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 810, __pyx_L1_error)
  __pyx_v_v_keys = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":811
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 *     cdef tuple v_keys = _pg_list_to_tuple(data.keys, offset_to_index)
 *     cdef tuple v_including = _pg_list_to_tuple(data.including, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_exclusions = _pg_list_to_tuple(data.exclusions, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->including, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 811, __pyx_L1_error)
  __pyx_v_v_including = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":812
 *     cdef tuple v_keys = _pg_list_to_tuple(data.keys, offset_to_index)
 *     cdef tuple v_including = _pg_list_to_tuple(data.including, offset_to_index)
 *     cdef tuple v_exclusions = _pg_list_to_tuple(data.exclusions, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->exclusions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 812, __pyx_L1_error)
  __pyx_v_v_exclusions = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":813
 *     cdef tuple v_including = _pg_list_to_tuple(data.including, offset_to_index)
 *     cdef tuple v_exclusions = _pg_list_to_tuple(data.exclusions, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 *     cdef object v_indexspace = data.indexspace.decode("utf-8") if data.indexspace is not NULL else None
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 813, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":814
 *     cdef tuple v_exclusions = _pg_list_to_tuple(data.exclusions, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_indexspace = data.indexspace.decode("utf-8") if data.indexspace is not NULL else None
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)
 */
  if ((__pyx_v_data->indexname != NULL)) {
    __pyx_t_9 = __pyx_v_data->indexname;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_9, 0, strlen(__pyx_t_9), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_indexname = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":815
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 *     cdef object v_indexspace = data.indexspace.decode("utf-8") if data.indexspace is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)
 *     cdef object v_access_method = data.access_method.decode("utf-8") if data.access_method is not NULL else None
 */
  if ((__pyx_v_data->indexspace != NULL)) {
    __pyx_t_10 = __pyx_v_data->indexspace;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_indexspace = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":816
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 *     cdef object v_indexspace = data.indexspace.decode("utf-8") if data.indexspace is not NULL else None
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)             # <<<<<<<<<<<<<<
 *     cdef object v_access_method = data.access_method.decode("utf-8") if data.access_method is not NULL else None
 *     cdef object v_where_clause = create(data.where_clause, offset_to_index) if data.where_clause is not NULL else None
 */
  __pyx_t_2 = __Pyx_PyInt_From_bool(__pyx_v_data->reset_default_tblspc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_reset_default_tblspc = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":817
 *     cdef object v_indexspace = data.indexspace.decode("utf-8") if data.indexspace is not NULL else None
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)
 *     cdef object v_access_method = data.access_method.decode("utf-8") if data.access_method is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_where_clause = create(data.where_clause, offset_to_index) if data.where_clause is not NULL else None
 *     cdef object v_pktable = create(data.pktable, offset_to_index) if data.pktable is not NULL else None
 */
  if ((__pyx_v_data->access_method != NULL)) {
    __pyx_t_11 = __pyx_v_data->access_method;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_access_method = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":818
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)
 *     cdef object v_access_method = data.access_method.decode("utf-8") if data.access_method is not NULL else None
 *     cdef object v_where_clause = create(data.where_clause, offset_to_index) if data.where_clause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_pktable = create(data.pktable, offset_to_index) if data.pktable is not NULL else None
 *     cdef tuple v_fk_attrs = _pg_list_to_tuple(data.fk_attrs, offset_to_index)
 */
  if ((__pyx_v_data->where_clause != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->where_clause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_where_clause = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":819
 *     cdef object v_access_method = data.access_method.decode("utf-8") if data.access_method is not NULL else None
 *     cdef object v_where_clause = create(data.where_clause, offset_to_index) if data.where_clause is not NULL else None
 *     cdef object v_pktable = create(data.pktable, offset_to_index) if data.pktable is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_fk_attrs = _pg_list_to_tuple(data.fk_attrs, offset_to_index)
 *     cdef tuple v_pk_attrs = _pg_list_to_tuple(data.pk_attrs, offset_to_index)
 */
  if ((__pyx_v_data->pktable != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->pktable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  __pyx_v_v_pktable = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":820
 *     cdef object v_where_clause = create(data.where_clause, offset_to_index) if data.where_clause is not NULL else None
 *     cdef object v_pktable = create(data.pktable, offset_to_index) if data.pktable is not NULL else None
 *     cdef tuple v_fk_attrs = _pg_list_to_tuple(data.fk_attrs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_pk_attrs = _pg_list_to_tuple(data.pk_attrs, offset_to_index)
 *     cdef object v_fk_matchtype = chr(data.fk_matchtype)
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fk_attrs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 820, __pyx_L1_error)
  __pyx_v_v_fk_attrs = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":821
 *     cdef object v_pktable = create(data.pktable, offset_to_index) if data.pktable is not NULL else None
 *     cdef tuple v_fk_attrs = _pg_list_to_tuple(data.fk_attrs, offset_to_index)
 *     cdef tuple v_pk_attrs = _pg_list_to_tuple(data.pk_attrs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_fk_matchtype = chr(data.fk_matchtype)
 *     cdef object v_fk_upd_action = chr(data.fk_upd_action)
 */
  __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->pk_attrs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 821, __pyx_L1_error)
  __pyx_v_v_pk_attrs = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":822
 *     cdef tuple v_fk_attrs = _pg_list_to_tuple(data.fk_attrs, offset_to_index)
 *     cdef tuple v_pk_attrs = _pg_list_to_tuple(data.pk_attrs, offset_to_index)
 *     cdef object v_fk_matchtype = chr(data.fk_matchtype)             # <<<<<<<<<<<<<<
 *     cdef object v_fk_upd_action = chr(data.fk_upd_action)
 *     cdef object v_fk_del_action = chr(data.fk_del_action)
 */
  __pyx_t_2 = __Pyx_PyInt_From_char(__pyx_v_data->fk_matchtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_v_fk_matchtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":823
 *     cdef tuple v_pk_attrs = _pg_list_to_tuple(data.pk_attrs, offset_to_index)
 *     cdef object v_fk_matchtype = chr(data.fk_matchtype)
 *     cdef object v_fk_upd_action = chr(data.fk_upd_action)             # <<<<<<<<<<<<<<
 *     cdef object v_fk_del_action = chr(data.fk_del_action)
 *     cdef tuple v_fk_del_set_cols = _pg_list_to_tuple(data.fk_del_set_cols, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->fk_upd_action); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_fk_upd_action = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":824
 *     cdef object v_fk_matchtype = chr(data.fk_matchtype)
 *     cdef object v_fk_upd_action = chr(data.fk_upd_action)
 *     cdef object v_fk_del_action = chr(data.fk_del_action)             # <<<<<<<<<<<<<<
 *     cdef tuple v_fk_del_set_cols = _pg_list_to_tuple(data.fk_del_set_cols, offset_to_index)
 *     cdef tuple v_old_conpfeqop = _pg_list_to_tuple(data.old_conpfeqop, offset_to_index)
 */
  __pyx_t_2 = __Pyx_PyInt_From_char(__pyx_v_data->fk_del_action); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_v_fk_del_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":825
 *     cdef object v_fk_upd_action = chr(data.fk_upd_action)
 *     cdef object v_fk_del_action = chr(data.fk_del_action)
 *     cdef tuple v_fk_del_set_cols = _pg_list_to_tuple(data.fk_del_set_cols, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_old_conpfeqop = _pg_list_to_tuple(data.old_conpfeqop, offset_to_index)
 *     cdef object v_skip_validation = bool(data.skip_validation)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fk_del_set_cols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 825, __pyx_L1_error)
  __pyx_v_v_fk_del_set_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":826
 *     cdef object v_fk_del_action = chr(data.fk_del_action)
 *     cdef tuple v_fk_del_set_cols = _pg_list_to_tuple(data.fk_del_set_cols, offset_to_index)
 *     cdef tuple v_old_conpfeqop = _pg_list_to_tuple(data.old_conpfeqop, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_skip_validation = bool(data.skip_validation)
 *     cdef object v_initially_valid = bool(data.initially_valid)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->old_conpfeqop, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 826, __pyx_L1_error)
  __pyx_v_v_old_conpfeqop = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":827
 *     cdef tuple v_fk_del_set_cols = _pg_list_to_tuple(data.fk_del_set_cols, offset_to_index)
 *     cdef tuple v_old_conpfeqop = _pg_list_to_tuple(data.old_conpfeqop, offset_to_index)
 *     cdef object v_skip_validation = bool(data.skip_validation)             # <<<<<<<<<<<<<<
 *     cdef object v_initially_valid = bool(data.initially_valid)
 *     return ast.Constraint(v_contype, v_conname, v_deferrable, v_initdeferred, v_location, v_is_no_inherit, v_raw_expr, v_cooked_expr, v_generated_when, v_nulls_not_distinct, v_keys, v_including, v_exclusions, v_options, v_indexname, v_indexspace, v_reset_default_tblspc, v_access_method, v_where_clause, v_pktable, v_fk_attrs, v_pk_attrs, v_fk_matchtype, v_fk_upd_action, v_fk_del_action, v_fk_del_set_cols, v_old_conpfeqop, v_skip_validation, v_initially_valid)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->skip_validation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skip_validation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":828
 *     cdef tuple v_old_conpfeqop = _pg_list_to_tuple(data.old_conpfeqop, offset_to_index)
 *     cdef object v_skip_validation = bool(data.skip_validation)
 *     cdef object v_initially_valid = bool(data.initially_valid)             # <<<<<<<<<<<<<<
 *     return ast.Constraint(v_contype, v_conname, v_deferrable, v_initdeferred, v_location, v_is_no_inherit, v_raw_expr, v_cooked_expr, v_generated_when, v_nulls_not_distinct, v_keys, v_including, v_exclusions, v_options, v_indexname, v_indexspace, v_reset_default_tblspc, v_access_method, v_where_clause, v_pktable, v_fk_attrs, v_pk_attrs, v_fk_matchtype, v_fk_upd_action, v_fk_del_action, v_fk_del_set_cols, v_old_conpfeqop, v_skip_validation, v_initially_valid)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->initially_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initially_valid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":829
 *     cdef object v_skip_validation = bool(data.skip_validation)
 *     cdef object v_initially_valid = bool(data.initially_valid)
 *     return ast.Constraint(v_contype, v_conname, v_deferrable, v_initdeferred, v_location, v_is_no_inherit, v_raw_expr, v_cooked_expr, v_generated_when, v_nulls_not_distinct, v_keys, v_including, v_exclusions, v_options, v_indexname, v_indexspace, v_reset_default_tblspc, v_access_method, v_where_clause, v_pktable, v_fk_attrs, v_pk_attrs, v_fk_matchtype, v_fk_upd_action, v_fk_del_action, v_fk_del_set_cols, v_old_conpfeqop, v_skip_validation, v_initially_valid)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[30] = {__pyx_t_2, __pyx_v_v_contype, __pyx_v_v_conname, __pyx_v_v_deferrable, __pyx_v_v_initdeferred, __pyx_v_v_location, __pyx_v_v_is_no_inherit, __pyx_v_v_raw_expr, __pyx_v_v_cooked_expr, __pyx_v_v_generated_when, __pyx_v_v_nulls_not_distinct, __pyx_v_v_keys, __pyx_v_v_including, __pyx_v_v_exclusions, __pyx_v_v_options, __pyx_v_v_indexname, __pyx_v_v_indexspace, __pyx_v_v_reset_default_tblspc, __pyx_v_v_access_method, __pyx_v_v_where_clause, __pyx_v_v_pktable, __pyx_v_v_fk_attrs, __pyx_v_v_pk_attrs, __pyx_v_v_fk_matchtype, __pyx_v_v_fk_upd_action, __pyx_v_v_fk_del_action, __pyx_v_v_fk_del_set_cols, __pyx_v_v_old_conpfeqop, __pyx_v_v_skip_validation, __pyx_v_v_initially_valid};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 29+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __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;

  /* "pglast/ast.pyx":799
 * 
 * 
 * cdef create_Constraint(structs.Constraint* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_contype = getattr(enums, 'ConstrType')(data.contype)
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_Constraint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_contype);
  __Pyx_XDECREF(__pyx_v_v_conname);
  __Pyx_XDECREF(__pyx_v_v_deferrable);
  __Pyx_XDECREF(__pyx_v_v_initdeferred);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XDECREF(__pyx_v_v_is_no_inherit);
  __Pyx_XDECREF(__pyx_v_v_raw_expr);
  __Pyx_XDECREF(__pyx_v_v_cooked_expr);
  __Pyx_XDECREF(__pyx_v_v_generated_when);
  __Pyx_XDECREF(__pyx_v_v_nulls_not_distinct);
  __Pyx_XDECREF(__pyx_v_v_keys);
  __Pyx_XDECREF(__pyx_v_v_including);
  __Pyx_XDECREF(__pyx_v_v_exclusions);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_indexname);
  __Pyx_XDECREF(__pyx_v_v_indexspace);
  __Pyx_XDECREF(__pyx_v_v_reset_default_tblspc);
  __Pyx_XDECREF(__pyx_v_v_access_method);
  __Pyx_XDECREF(__pyx_v_v_where_clause);
  __Pyx_XDECREF(__pyx_v_v_pktable);
  __Pyx_XDECREF(__pyx_v_v_fk_attrs);
  __Pyx_XDECREF(__pyx_v_v_pk_attrs);
  __Pyx_XDECREF(__pyx_v_v_fk_matchtype);
  __Pyx_XDECREF(__pyx_v_v_fk_upd_action);
  __Pyx_XDECREF(__pyx_v_v_fk_del_action);
  __Pyx_XDECREF(__pyx_v_v_fk_del_set_cols);
  __Pyx_XDECREF(__pyx_v_v_old_conpfeqop);
  __Pyx_XDECREF(__pyx_v_v_skip_validation);
  __Pyx_XDECREF(__pyx_v_v_initially_valid);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":832
 * 
 * 
 * cdef create_CreateTableSpaceStmt(structs.CreateTableSpaceStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_owner = create(data.owner, offset_to_index) if data.owner is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateTableSpaceStmt(CreateTableSpaceStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_tablespacename = 0;
  PyObject *__pyx_v_v_owner = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTableSpaceStmt", 0);

  /* "pglast/ast.pyx":833
 * 
 * cdef create_CreateTableSpaceStmt(structs.CreateTableSpaceStmt* data, offset_to_index):
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_owner = create(data.owner, offset_to_index) if data.owner is not NULL else None
 *     cdef object v_location = data.location.decode("utf-8") if data.location is not NULL else None
 */
  if ((__pyx_v_data->tablespacename != NULL)) {
    __pyx_t_2 = __pyx_v_data->tablespacename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tablespacename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":834
 * cdef create_CreateTableSpaceStmt(structs.CreateTableSpaceStmt* data, offset_to_index):
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_owner = create(data.owner, offset_to_index) if data.owner is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = data.location.decode("utf-8") if data.location is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->owner != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->owner, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_owner = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":835
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_owner = create(data.owner, offset_to_index) if data.owner is not NULL else None
 *     cdef object v_location = data.location.decode("utf-8") if data.location is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateTableSpaceStmt(v_tablespacename, v_owner, v_location, v_options)
 */
  if ((__pyx_v_data->location != NULL)) {
    __pyx_t_4 = __pyx_v_data->location;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":836
 *     cdef object v_owner = create(data.owner, offset_to_index) if data.owner is not NULL else None
 *     cdef object v_location = data.location.decode("utf-8") if data.location is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateTableSpaceStmt(v_tablespacename, v_owner, v_location, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 836, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":837
 *     cdef object v_location = data.location.decode("utf-8") if data.location is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateTableSpaceStmt(v_tablespacename, v_owner, v_location, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateTableSpaceStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_tablespacename, __pyx_v_v_owner, __pyx_v_v_location, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":832
 * 
 * 
 * cdef create_CreateTableSpaceStmt(structs.CreateTableSpaceStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_owner = create(data.owner, offset_to_index) if data.owner is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateTableSpaceStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_tablespacename);
  __Pyx_XDECREF(__pyx_v_v_owner);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":840
 * 
 * 
 * cdef create_DropTableSpaceStmt(structs.DropTableSpaceStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DropTableSpaceStmt(DropTableSpaceStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_tablespacename = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropTableSpaceStmt", 0);

  /* "pglast/ast.pyx":841
 * 
 * cdef create_DropTableSpaceStmt(structs.DropTableSpaceStmt* data, offset_to_index):
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.DropTableSpaceStmt(v_tablespacename, v_missing_ok)
 */
  if ((__pyx_v_data->tablespacename != NULL)) {
    __pyx_t_2 = __pyx_v_data->tablespacename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tablespacename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":842
 * cdef create_DropTableSpaceStmt(structs.DropTableSpaceStmt* data, offset_to_index):
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.DropTableSpaceStmt(v_tablespacename, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":843
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.DropTableSpaceStmt(v_tablespacename, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DropTableSpaceStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_tablespacename, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":840
 * 
 * 
 * cdef create_DropTableSpaceStmt(structs.DropTableSpaceStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_DropTableSpaceStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_tablespacename);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":846
 * 
 * 
 * cdef create_AlterTableSpaceOptionsStmt(structs.AlterTableSpaceOptionsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterTableSpaceOptionsStmt(AlterTableSpaceOptionsStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_tablespacename = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_isReset = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableSpaceOptionsStmt", 0);

  /* "pglast/ast.pyx":847
 * 
 * cdef create_AlterTableSpaceOptionsStmt(structs.AlterTableSpaceOptionsStmt* data, offset_to_index):
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_isReset = bool(data.isReset)
 */
  if ((__pyx_v_data->tablespacename != NULL)) {
    __pyx_t_2 = __pyx_v_data->tablespacename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tablespacename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":848
 * cdef create_AlterTableSpaceOptionsStmt(structs.AlterTableSpaceOptionsStmt* data, offset_to_index):
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_isReset = bool(data.isReset)
 *     return ast.AlterTableSpaceOptionsStmt(v_tablespacename, v_options, v_isReset)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 848, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":849
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_isReset = bool(data.isReset)             # <<<<<<<<<<<<<<
 *     return ast.AlterTableSpaceOptionsStmt(v_tablespacename, v_options, v_isReset)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isReset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isReset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":850
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_isReset = bool(data.isReset)
 *     return ast.AlterTableSpaceOptionsStmt(v_tablespacename, v_options, v_isReset)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterTableSpaceOptionsStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_tablespacename, __pyx_v_v_options, __pyx_v_v_isReset};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":846
 * 
 * 
 * cdef create_AlterTableSpaceOptionsStmt(structs.AlterTableSpaceOptionsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tablespacename = data.tablespacename.decode("utf-8") if data.tablespacename is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_AlterTableSpaceOptionsStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_tablespacename);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_isReset);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":853
 * 
 * 
 * cdef create_AlterTableMoveAllStmt(structs.AlterTableMoveAllStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_orig_tablespacename = data.orig_tablespacename.decode("utf-8") if data.orig_tablespacename is not NULL else None
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterTableMoveAllStmt(AlterTableMoveAllStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_orig_tablespacename = 0;
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_roles = 0;
  PyObject *__pyx_v_v_new_tablespacename = 0;
  PyObject *__pyx_v_v_nowait = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableMoveAllStmt", 0);

  /* "pglast/ast.pyx":854
 * 
 * cdef create_AlterTableMoveAllStmt(structs.AlterTableMoveAllStmt* data, offset_to_index):
 *     cdef object v_orig_tablespacename = data.orig_tablespacename.decode("utf-8") if data.orig_tablespacename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 */
  if ((__pyx_v_data->orig_tablespacename != NULL)) {
    __pyx_t_2 = __pyx_v_data->orig_tablespacename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_orig_tablespacename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":855
 * cdef create_AlterTableMoveAllStmt(structs.AlterTableMoveAllStmt* data, offset_to_index):
 *     cdef object v_orig_tablespacename = data.orig_tablespacename.decode("utf-8") if data.orig_tablespacename is not NULL else None
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_new_tablespacename = data.new_tablespacename.decode("utf-8") if data.new_tablespacename is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":856
 *     cdef object v_orig_tablespacename = data.orig_tablespacename.decode("utf-8") if data.orig_tablespacename is not NULL else None
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_new_tablespacename = data.new_tablespacename.decode("utf-8") if data.new_tablespacename is not NULL else None
 *     cdef object v_nowait = bool(data.nowait)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 856, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":857
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_new_tablespacename = data.new_tablespacename.decode("utf-8") if data.new_tablespacename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_nowait = bool(data.nowait)
 *     return ast.AlterTableMoveAllStmt(v_orig_tablespacename, v_objtype, v_roles, v_new_tablespacename, v_nowait)
 */
  if ((__pyx_v_data->new_tablespacename != NULL)) {
    __pyx_t_7 = __pyx_v_data->new_tablespacename;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_new_tablespacename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":858
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_new_tablespacename = data.new_tablespacename.decode("utf-8") if data.new_tablespacename is not NULL else None
 *     cdef object v_nowait = bool(data.nowait)             # <<<<<<<<<<<<<<
 *     return ast.AlterTableMoveAllStmt(v_orig_tablespacename, v_objtype, v_roles, v_new_tablespacename, v_nowait)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->nowait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nowait = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":859
 *     cdef object v_new_tablespacename = data.new_tablespacename.decode("utf-8") if data.new_tablespacename is not NULL else None
 *     cdef object v_nowait = bool(data.nowait)
 *     return ast.AlterTableMoveAllStmt(v_orig_tablespacename, v_objtype, v_roles, v_new_tablespacename, v_nowait)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_AlterTableMoveAllStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_v_orig_tablespacename, __pyx_v_v_objtype, __pyx_v_v_roles, __pyx_v_v_new_tablespacename, __pyx_v_v_nowait};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 5+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __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;

  /* "pglast/ast.pyx":853
 * 
 * 
 * cdef create_AlterTableMoveAllStmt(structs.AlterTableMoveAllStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_orig_tablespacename = data.orig_tablespacename.decode("utf-8") if data.orig_tablespacename is not NULL else None
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_AlterTableMoveAllStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_orig_tablespacename);
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_roles);
  __Pyx_XDECREF(__pyx_v_v_new_tablespacename);
  __Pyx_XDECREF(__pyx_v_v_nowait);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":862
 * 
 * 
 * cdef create_CreateExtensionStmt(structs.CreateExtensionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateExtensionStmt(CreateExtensionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_extname = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateExtensionStmt", 0);

  /* "pglast/ast.pyx":863
 * 
 * cdef create_CreateExtensionStmt(structs.CreateExtensionStmt* data, offset_to_index):
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->extname != NULL)) {
    __pyx_t_2 = __pyx_v_data->extname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_extname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":864
 * cdef create_CreateExtensionStmt(structs.CreateExtensionStmt* data, offset_to_index):
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateExtensionStmt(v_extname, v_if_not_exists, v_options)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":865
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateExtensionStmt(v_extname, v_if_not_exists, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 865, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":866
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateExtensionStmt(v_extname, v_if_not_exists, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateExtensionStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_extname, __pyx_v_v_if_not_exists, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":862
 * 
 * 
 * cdef create_CreateExtensionStmt(structs.CreateExtensionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateExtensionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_extname);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":869
 * 
 * 
 * cdef create_AlterExtensionStmt(structs.AlterExtensionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterExtensionStmt(AlterExtensionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_extname = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterExtensionStmt", 0);

  /* "pglast/ast.pyx":870
 * 
 * cdef create_AlterExtensionStmt(structs.AlterExtensionStmt* data, offset_to_index):
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterExtensionStmt(v_extname, v_options)
 */
  if ((__pyx_v_data->extname != NULL)) {
    __pyx_t_2 = __pyx_v_data->extname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_extname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":871
 * cdef create_AlterExtensionStmt(structs.AlterExtensionStmt* data, offset_to_index):
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterExtensionStmt(v_extname, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 871, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":872
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterExtensionStmt(v_extname, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterExtensionStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_extname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":869
 * 
 * 
 * cdef create_AlterExtensionStmt(structs.AlterExtensionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterExtensionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_extname);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":875
 * 
 * 
 * cdef create_AlterExtensionContentsStmt(structs.AlterExtensionContentsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_action = data.action
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterExtensionContentsStmt(AlterExtensionContentsStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_extname = 0;
  PyObject *__pyx_v_v_action = 0;
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_object = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterExtensionContentsStmt", 0);

  /* "pglast/ast.pyx":876
 * 
 * cdef create_AlterExtensionContentsStmt(structs.AlterExtensionContentsStmt* data, offset_to_index):
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_action = data.action
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 */
  if ((__pyx_v_data->extname != NULL)) {
    __pyx_t_2 = __pyx_v_data->extname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_extname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":877
 * cdef create_AlterExtensionContentsStmt(structs.AlterExtensionContentsStmt* data, offset_to_index):
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_action = data.action             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->action); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":878
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_action = data.action
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     return ast.AlterExtensionContentsStmt(v_extname, v_action, v_objtype, v_object)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":879
 *     cdef object v_action = data.action
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterExtensionContentsStmt(v_extname, v_action, v_objtype, v_object)
 * 
 */
  if ((__pyx_v_data->object != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":880
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     return ast.AlterExtensionContentsStmt(v_extname, v_action, v_objtype, v_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_AlterExtensionContentsStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_extname, __pyx_v_v_action, __pyx_v_v_objtype, __pyx_v_v_object};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __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;

  /* "pglast/ast.pyx":875
 * 
 * 
 * cdef create_AlterExtensionContentsStmt(structs.AlterExtensionContentsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_extname = data.extname.decode("utf-8") if data.extname is not NULL else None
 *     cdef object v_action = data.action
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_AlterExtensionContentsStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_extname);
  __Pyx_XDECREF(__pyx_v_v_action);
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_object);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":883
 * 
 * 
 * cdef create_CreateFdwStmt(structs.CreateFdwStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateFdwStmt(CreateFdwStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_fdwname = 0;
  PyObject *__pyx_v_v_func_options = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateFdwStmt", 0);

  /* "pglast/ast.pyx":884
 * 
 * cdef create_CreateFdwStmt(structs.CreateFdwStmt* data, offset_to_index):
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->fdwname != NULL)) {
    __pyx_t_2 = __pyx_v_data->fdwname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_fdwname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":885
 * cdef create_CreateFdwStmt(structs.CreateFdwStmt* data, offset_to_index):
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateFdwStmt(v_fdwname, v_func_options, v_options)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->func_options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 885, __pyx_L1_error)
  __pyx_v_v_func_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":886
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateFdwStmt(v_fdwname, v_func_options, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 886, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":887
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateFdwStmt(v_fdwname, v_func_options, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateFdwStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_fdwname, __pyx_v_v_func_options, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":883
 * 
 * 
 * cdef create_CreateFdwStmt(structs.CreateFdwStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateFdwStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_fdwname);
  __Pyx_XDECREF(__pyx_v_v_func_options);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":890
 * 
 * 
 * cdef create_AlterFdwStmt(structs.AlterFdwStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterFdwStmt(AlterFdwStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_fdwname = 0;
  PyObject *__pyx_v_v_func_options = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterFdwStmt", 0);

  /* "pglast/ast.pyx":891
 * 
 * cdef create_AlterFdwStmt(structs.AlterFdwStmt* data, offset_to_index):
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->fdwname != NULL)) {
    __pyx_t_2 = __pyx_v_data->fdwname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_fdwname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":892
 * cdef create_AlterFdwStmt(structs.AlterFdwStmt* data, offset_to_index):
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterFdwStmt(v_fdwname, v_func_options, v_options)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->func_options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 892, __pyx_L1_error)
  __pyx_v_v_func_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":893
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterFdwStmt(v_fdwname, v_func_options, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 893, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":894
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterFdwStmt(v_fdwname, v_func_options, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterFdwStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_fdwname, __pyx_v_v_func_options, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":890
 * 
 * 
 * cdef create_AlterFdwStmt(structs.AlterFdwStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef tuple v_func_options = _pg_list_to_tuple(data.func_options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterFdwStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_fdwname);
  __Pyx_XDECREF(__pyx_v_v_func_options);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":897
 * 
 * 
 * cdef create_CreateForeignServerStmt(structs.CreateForeignServerStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_servertype = data.servertype.decode("utf-8") if data.servertype is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateForeignServerStmt(CreateForeignServerStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_servername = 0;
  PyObject *__pyx_v_v_servertype = 0;
  PyObject *__pyx_v_v_version = 0;
  PyObject *__pyx_v_v_fdwname = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  char const *__pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateForeignServerStmt", 0);

  /* "pglast/ast.pyx":898
 * 
 * cdef create_CreateForeignServerStmt(structs.CreateForeignServerStmt* data, offset_to_index):
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_servertype = data.servertype.decode("utf-8") if data.servertype is not NULL else None
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 */
  if ((__pyx_v_data->servername != NULL)) {
    __pyx_t_2 = __pyx_v_data->servername;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_servername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":899
 * cdef create_CreateForeignServerStmt(structs.CreateForeignServerStmt* data, offset_to_index):
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_servertype = data.servertype.decode("utf-8") if data.servertype is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 */
  if ((__pyx_v_data->servertype != NULL)) {
    __pyx_t_4 = __pyx_v_data->servertype;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_servertype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":900
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_servertype = data.servertype.decode("utf-8") if data.servertype is not NULL else None
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  if ((__pyx_v_data->version != NULL)) {
    __pyx_t_5 = __pyx_v_data->version;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_version = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":901
 *     cdef object v_servertype = data.servertype.decode("utf-8") if data.servertype is not NULL else None
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->fdwname != NULL)) {
    __pyx_t_6 = __pyx_v_data->fdwname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_fdwname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":902
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateForeignServerStmt(v_servername, v_servertype, v_version, v_fdwname, v_if_not_exists, v_options)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":903
 *     cdef object v_fdwname = data.fdwname.decode("utf-8") if data.fdwname is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateForeignServerStmt(v_servername, v_servertype, v_version, v_fdwname, v_if_not_exists, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 903, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":904
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateForeignServerStmt(v_servername, v_servertype, v_version, v_fdwname, v_if_not_exists, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateForeignServerStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_servername, __pyx_v_v_servertype, __pyx_v_v_version, __pyx_v_v_fdwname, __pyx_v_v_if_not_exists, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 6+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":897
 * 
 * 
 * cdef create_CreateForeignServerStmt(structs.CreateForeignServerStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_servertype = data.servertype.decode("utf-8") if data.servertype is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pglast.parser.create_CreateForeignServerStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_servername);
  __Pyx_XDECREF(__pyx_v_v_servertype);
  __Pyx_XDECREF(__pyx_v_v_version);
  __Pyx_XDECREF(__pyx_v_v_fdwname);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":907
 * 
 * 
 * cdef create_AlterForeignServerStmt(structs.AlterForeignServerStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterForeignServerStmt(AlterForeignServerStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_servername = 0;
  PyObject *__pyx_v_v_version = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_has_version = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterForeignServerStmt", 0);

  /* "pglast/ast.pyx":908
 * 
 * cdef create_AlterForeignServerStmt(structs.AlterForeignServerStmt* data, offset_to_index):
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->servername != NULL)) {
    __pyx_t_2 = __pyx_v_data->servername;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_servername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":909
 * cdef create_AlterForeignServerStmt(structs.AlterForeignServerStmt* data, offset_to_index):
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_has_version = bool(data.has_version)
 */
  if ((__pyx_v_data->version != NULL)) {
    __pyx_t_4 = __pyx_v_data->version;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_version = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":910
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_has_version = bool(data.has_version)
 *     return ast.AlterForeignServerStmt(v_servername, v_version, v_options, v_has_version)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 910, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":911
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_has_version = bool(data.has_version)             # <<<<<<<<<<<<<<
 *     return ast.AlterForeignServerStmt(v_servername, v_version, v_options, v_has_version)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->has_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_has_version = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":912
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_has_version = bool(data.has_version)
 *     return ast.AlterForeignServerStmt(v_servername, v_version, v_options, v_has_version)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterForeignServerStmt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_servername, __pyx_v_v_version, __pyx_v_v_options, __pyx_v_v_has_version};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":907
 * 
 * 
 * cdef create_AlterForeignServerStmt(structs.AlterForeignServerStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_version = data.version.decode("utf-8") if data.version is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_AlterForeignServerStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_servername);
  __Pyx_XDECREF(__pyx_v_v_version);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_has_version);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":915
 * 
 * 
 * cdef create_CreateForeignTableStmt(structs.CreateForeignTableStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 * 
 *     cdef object v_base = create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateForeignTableStmt(CreateForeignTableStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_base = 0;
  PyObject *__pyx_v_v_servername = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateForeignTableStmt", 0);

  /* "pglast/ast.pyx":917
 * cdef create_CreateForeignTableStmt(structs.CreateForeignTableStmt* data, offset_to_index):
 * 
 *     cdef object v_base = create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser_create_CreateStmt(((CreateStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":918
 * 
 *     cdef object v_base = create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateForeignTableStmt(v_base, v_servername, v_options)
 */
  if ((__pyx_v_data->servername != NULL)) {
    __pyx_t_2 = __pyx_v_data->servername;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_servername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":919
 *     cdef object v_base = create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateForeignTableStmt(v_base, v_servername, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 919, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":920
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateForeignTableStmt(v_base, v_servername, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateForeignTableStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_base, __pyx_v_v_servername, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":915
 * 
 * 
 * cdef create_CreateForeignTableStmt(structs.CreateForeignTableStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 * 
 *     cdef object v_base = create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateForeignTableStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_base);
  __Pyx_XDECREF(__pyx_v_v_servername);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":923
 * 
 * 
 * cdef create_CreateUserMappingStmt(structs.CreateUserMappingStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateUserMappingStmt(CreateUserMappingStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_user = 0;
  PyObject *__pyx_v_v_servername = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateUserMappingStmt", 0);

  /* "pglast/ast.pyx":924
 * 
 * cdef create_CreateUserMappingStmt(structs.CreateUserMappingStmt* data, offset_to_index):
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  if ((__pyx_v_data->user != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->user, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_user = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":925
 * cdef create_CreateUserMappingStmt(structs.CreateUserMappingStmt* data, offset_to_index):
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->servername != NULL)) {
    __pyx_t_3 = __pyx_v_data->servername;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_servername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":926
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateUserMappingStmt(v_user, v_servername, v_if_not_exists, v_options)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":927
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateUserMappingStmt(v_user, v_servername, v_if_not_exists, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 927, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":928
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateUserMappingStmt(v_user, v_servername, v_if_not_exists, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CreateUserMappingStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_user, __pyx_v_v_servername, __pyx_v_v_if_not_exists, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":923
 * 
 * 
 * cdef create_CreateUserMappingStmt(structs.CreateUserMappingStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateUserMappingStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_user);
  __Pyx_XDECREF(__pyx_v_v_servername);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":931
 * 
 * 
 * cdef create_AlterUserMappingStmt(structs.AlterUserMappingStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterUserMappingStmt(AlterUserMappingStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_user = 0;
  PyObject *__pyx_v_v_servername = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterUserMappingStmt", 0);

  /* "pglast/ast.pyx":932
 * 
 * cdef create_AlterUserMappingStmt(structs.AlterUserMappingStmt* data, offset_to_index):
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->user != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->user, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_user = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":933
 * cdef create_AlterUserMappingStmt(structs.AlterUserMappingStmt* data, offset_to_index):
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterUserMappingStmt(v_user, v_servername, v_options)
 */
  if ((__pyx_v_data->servername != NULL)) {
    __pyx_t_3 = __pyx_v_data->servername;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_servername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":934
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterUserMappingStmt(v_user, v_servername, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 934, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":935
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterUserMappingStmt(v_user, v_servername, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterUserMappingStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_user, __pyx_v_v_servername, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":931
 * 
 * 
 * cdef create_AlterUserMappingStmt(structs.AlterUserMappingStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterUserMappingStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_user);
  __Pyx_XDECREF(__pyx_v_v_servername);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":938
 * 
 * 
 * cdef create_DropUserMappingStmt(structs.DropUserMappingStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_DropUserMappingStmt(DropUserMappingStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_user = 0;
  PyObject *__pyx_v_v_servername = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropUserMappingStmt", 0);

  /* "pglast/ast.pyx":939
 * 
 * cdef create_DropUserMappingStmt(structs.DropUserMappingStmt* data, offset_to_index):
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  if ((__pyx_v_data->user != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->user, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_user = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":940
 * cdef create_DropUserMappingStmt(structs.DropUserMappingStmt* data, offset_to_index):
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.DropUserMappingStmt(v_user, v_servername, v_missing_ok)
 */
  if ((__pyx_v_data->servername != NULL)) {
    __pyx_t_3 = __pyx_v_data->servername;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_servername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":941
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.DropUserMappingStmt(v_user, v_servername, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":942
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.DropUserMappingStmt(v_user, v_servername, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DropUserMappingStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_user, __pyx_v_v_servername, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":938
 * 
 * 
 * cdef create_DropUserMappingStmt(structs.DropUserMappingStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_user = create(data.user, offset_to_index) if data.user is not NULL else None
 *     cdef object v_servername = data.servername.decode("utf-8") if data.servername is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_DropUserMappingStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_user);
  __Pyx_XDECREF(__pyx_v_v_servername);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":945
 * 
 * 
 * cdef create_ImportForeignSchemaStmt(structs.ImportForeignSchemaStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_server_name = data.server_name.decode("utf-8") if data.server_name is not NULL else None
 *     cdef object v_remote_schema = data.remote_schema.decode("utf-8") if data.remote_schema is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_ImportForeignSchemaStmt(ImportForeignSchemaStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_server_name = 0;
  PyObject *__pyx_v_v_remote_schema = 0;
  PyObject *__pyx_v_v_local_schema = 0;
  PyObject *__pyx_v_v_list_type = 0;
  PyObject *__pyx_v_v_table_list = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  char const *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ImportForeignSchemaStmt", 0);

  /* "pglast/ast.pyx":946
 * 
 * cdef create_ImportForeignSchemaStmt(structs.ImportForeignSchemaStmt* data, offset_to_index):
 *     cdef object v_server_name = data.server_name.decode("utf-8") if data.server_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_remote_schema = data.remote_schema.decode("utf-8") if data.remote_schema is not NULL else None
 *     cdef object v_local_schema = data.local_schema.decode("utf-8") if data.local_schema is not NULL else None
 */
  if ((__pyx_v_data->server_name != NULL)) {
    __pyx_t_2 = __pyx_v_data->server_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_server_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":947
 * cdef create_ImportForeignSchemaStmt(structs.ImportForeignSchemaStmt* data, offset_to_index):
 *     cdef object v_server_name = data.server_name.decode("utf-8") if data.server_name is not NULL else None
 *     cdef object v_remote_schema = data.remote_schema.decode("utf-8") if data.remote_schema is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_local_schema = data.local_schema.decode("utf-8") if data.local_schema is not NULL else None
 *     cdef object v_list_type = getattr(enums, 'ImportForeignSchemaType')(data.list_type)
 */
  if ((__pyx_v_data->remote_schema != NULL)) {
    __pyx_t_4 = __pyx_v_data->remote_schema;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_remote_schema = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":948
 *     cdef object v_server_name = data.server_name.decode("utf-8") if data.server_name is not NULL else None
 *     cdef object v_remote_schema = data.remote_schema.decode("utf-8") if data.remote_schema is not NULL else None
 *     cdef object v_local_schema = data.local_schema.decode("utf-8") if data.local_schema is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_list_type = getattr(enums, 'ImportForeignSchemaType')(data.list_type)
 *     cdef tuple v_table_list = _pg_list_to_tuple(data.table_list, offset_to_index)
 */
  if ((__pyx_v_data->local_schema != NULL)) {
    __pyx_t_5 = __pyx_v_data->local_schema;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_local_schema = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":949
 *     cdef object v_remote_schema = data.remote_schema.decode("utf-8") if data.remote_schema is not NULL else None
 *     cdef object v_local_schema = data.local_schema.decode("utf-8") if data.local_schema is not NULL else None
 *     cdef object v_list_type = getattr(enums, 'ImportForeignSchemaType')(data.list_type)             # <<<<<<<<<<<<<<
 *     cdef tuple v_table_list = _pg_list_to_tuple(data.table_list, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_ImportForeignSchemaType); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_ImportForeignSchemaType(__pyx_v_data->list_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_v_list_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":950
 *     cdef object v_local_schema = data.local_schema.decode("utf-8") if data.local_schema is not NULL else None
 *     cdef object v_list_type = getattr(enums, 'ImportForeignSchemaType')(data.list_type)
 *     cdef tuple v_table_list = _pg_list_to_tuple(data.table_list, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.ImportForeignSchemaStmt(v_server_name, v_remote_schema, v_local_schema, v_list_type, v_table_list, v_options)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->table_list, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 950, __pyx_L1_error)
  __pyx_v_v_table_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":951
 *     cdef object v_list_type = getattr(enums, 'ImportForeignSchemaType')(data.list_type)
 *     cdef tuple v_table_list = _pg_list_to_tuple(data.table_list, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.ImportForeignSchemaStmt(v_server_name, v_remote_schema, v_local_schema, v_list_type, v_table_list, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 951, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":952
 *     cdef tuple v_table_list = _pg_list_to_tuple(data.table_list, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.ImportForeignSchemaStmt(v_server_name, v_remote_schema, v_local_schema, v_list_type, v_table_list, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ImportForeignSchemaStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_6, __pyx_v_v_server_name, __pyx_v_v_remote_schema, __pyx_v_v_local_schema, __pyx_v_v_list_type, __pyx_v_v_table_list, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 6+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __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;

  /* "pglast/ast.pyx":945
 * 
 * 
 * cdef create_ImportForeignSchemaStmt(structs.ImportForeignSchemaStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_server_name = data.server_name.decode("utf-8") if data.server_name is not NULL else None
 *     cdef object v_remote_schema = data.remote_schema.decode("utf-8") if data.remote_schema is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_ImportForeignSchemaStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_server_name);
  __Pyx_XDECREF(__pyx_v_v_remote_schema);
  __Pyx_XDECREF(__pyx_v_v_local_schema);
  __Pyx_XDECREF(__pyx_v_v_list_type);
  __Pyx_XDECREF(__pyx_v_v_table_list);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":955
 * 
 * 
 * cdef create_CreatePolicyStmt(structs.CreatePolicyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreatePolicyStmt(CreatePolicyStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_policy_name = 0;
  PyObject *__pyx_v_v_table = 0;
  PyObject *__pyx_v_v_cmd_name = 0;
  PyObject *__pyx_v_v_permissive = 0;
  PyObject *__pyx_v_v_roles = 0;
  PyObject *__pyx_v_v_qual = 0;
  PyObject *__pyx_v_v_with_check = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatePolicyStmt", 0);

  /* "pglast/ast.pyx":956
 * 
 * cdef create_CreatePolicyStmt(structs.CreatePolicyStmt* data, offset_to_index):
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 *     cdef object v_cmd_name = data.cmd_name.decode("utf-8") if data.cmd_name is not NULL else None
 */
  if ((__pyx_v_data->policy_name != NULL)) {
    __pyx_t_2 = __pyx_v_data->policy_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_policy_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":957
 * cdef create_CreatePolicyStmt(structs.CreatePolicyStmt* data, offset_to_index):
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cmd_name = data.cmd_name.decode("utf-8") if data.cmd_name is not NULL else None
 *     cdef object v_permissive = bool(data.permissive)
 */
  if ((__pyx_v_data->table != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->table, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_table = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":958
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 *     cdef object v_cmd_name = data.cmd_name.decode("utf-8") if data.cmd_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_permissive = bool(data.permissive)
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 */
  if ((__pyx_v_data->cmd_name != NULL)) {
    __pyx_t_4 = __pyx_v_data->cmd_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cmd_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":959
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 *     cdef object v_cmd_name = data.cmd_name.decode("utf-8") if data.cmd_name is not NULL else None
 *     cdef object v_permissive = bool(data.permissive)             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->permissive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_permissive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":960
 *     cdef object v_cmd_name = data.cmd_name.decode("utf-8") if data.cmd_name is not NULL else None
 *     cdef object v_permissive = bool(data.permissive)
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 960, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":961
 *     cdef object v_permissive = bool(data.permissive)
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None
 *     return ast.CreatePolicyStmt(v_policy_name, v_table, v_cmd_name, v_permissive, v_roles, v_qual, v_with_check)
 */
  if ((__pyx_v_data->qual != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_qual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":962
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CreatePolicyStmt(v_policy_name, v_table, v_cmd_name, v_permissive, v_roles, v_qual, v_with_check)
 * 
 */
  if ((__pyx_v_data->with_check != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->with_check, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_with_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":963
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None
 *     return ast.CreatePolicyStmt(v_policy_name, v_table, v_cmd_name, v_permissive, v_roles, v_qual, v_with_check)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreatePolicyStmt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_policy_name, __pyx_v_v_table, __pyx_v_v_cmd_name, __pyx_v_v_permissive, __pyx_v_v_roles, __pyx_v_v_qual, __pyx_v_v_with_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 7+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":955
 * 
 * 
 * cdef create_CreatePolicyStmt(structs.CreatePolicyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_CreatePolicyStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_policy_name);
  __Pyx_XDECREF(__pyx_v_v_table);
  __Pyx_XDECREF(__pyx_v_v_cmd_name);
  __Pyx_XDECREF(__pyx_v_v_permissive);
  __Pyx_XDECREF(__pyx_v_v_roles);
  __Pyx_XDECREF(__pyx_v_v_qual);
  __Pyx_XDECREF(__pyx_v_v_with_check);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":966
 * 
 * 
 * cdef create_AlterPolicyStmt(structs.AlterPolicyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterPolicyStmt(AlterPolicyStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_policy_name = 0;
  PyObject *__pyx_v_v_table = 0;
  PyObject *__pyx_v_v_roles = 0;
  PyObject *__pyx_v_v_qual = 0;
  PyObject *__pyx_v_v_with_check = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterPolicyStmt", 0);

  /* "pglast/ast.pyx":967
 * 
 * cdef create_AlterPolicyStmt(structs.AlterPolicyStmt* data, offset_to_index):
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 */
  if ((__pyx_v_data->policy_name != NULL)) {
    __pyx_t_2 = __pyx_v_data->policy_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_policy_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":968
 * cdef create_AlterPolicyStmt(structs.AlterPolicyStmt* data, offset_to_index):
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 */
  if ((__pyx_v_data->table != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->table, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_table = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":969
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 969, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":970
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None
 *     return ast.AlterPolicyStmt(v_policy_name, v_table, v_roles, v_qual, v_with_check)
 */
  if ((__pyx_v_data->qual != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_qual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":971
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterPolicyStmt(v_policy_name, v_table, v_roles, v_qual, v_with_check)
 * 
 */
  if ((__pyx_v_data->with_check != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->with_check, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_with_check = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":972
 *     cdef object v_qual = create(data.qual, offset_to_index) if data.qual is not NULL else None
 *     cdef object v_with_check = create(data.with_check, offset_to_index) if data.with_check is not NULL else None
 *     return ast.AlterPolicyStmt(v_policy_name, v_table, v_roles, v_qual, v_with_check)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterPolicyStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_policy_name, __pyx_v_v_table, __pyx_v_v_roles, __pyx_v_v_qual, __pyx_v_v_with_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":966
 * 
 * 
 * cdef create_AlterPolicyStmt(structs.AlterPolicyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_policy_name = data.policy_name.decode("utf-8") if data.policy_name is not NULL else None
 *     cdef object v_table = create(data.table, offset_to_index) if data.table is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterPolicyStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_policy_name);
  __Pyx_XDECREF(__pyx_v_v_table);
  __Pyx_XDECREF(__pyx_v_v_roles);
  __Pyx_XDECREF(__pyx_v_v_qual);
  __Pyx_XDECREF(__pyx_v_v_with_check);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":975
 * 
 * 
 * cdef create_CreateAmStmt(structs.CreateAmStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef tuple v_handler_name = _pg_list_to_tuple(data.handler_name, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateAmStmt(CreateAmStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_amname = 0;
  PyObject *__pyx_v_v_handler_name = 0;
  PyObject *__pyx_v_v_amtype = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateAmStmt", 0);

  /* "pglast/ast.pyx":976
 * 
 * cdef create_CreateAmStmt(structs.CreateAmStmt* data, offset_to_index):
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_handler_name = _pg_list_to_tuple(data.handler_name, offset_to_index)
 *     cdef object v_amtype = chr(data.amtype)
 */
  if ((__pyx_v_data->amname != NULL)) {
    __pyx_t_2 = __pyx_v_data->amname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_amname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":977
 * cdef create_CreateAmStmt(structs.CreateAmStmt* data, offset_to_index):
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef tuple v_handler_name = _pg_list_to_tuple(data.handler_name, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_amtype = chr(data.amtype)
 *     return ast.CreateAmStmt(v_amname, v_handler_name, v_amtype)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->handler_name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 977, __pyx_L1_error)
  __pyx_v_v_handler_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":978
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef tuple v_handler_name = _pg_list_to_tuple(data.handler_name, offset_to_index)
 *     cdef object v_amtype = chr(data.amtype)             # <<<<<<<<<<<<<<
 *     return ast.CreateAmStmt(v_amname, v_handler_name, v_amtype)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->amtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_amtype = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":979
 *     cdef tuple v_handler_name = _pg_list_to_tuple(data.handler_name, offset_to_index)
 *     cdef object v_amtype = chr(data.amtype)
 *     return ast.CreateAmStmt(v_amname, v_handler_name, v_amtype)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CreateAmStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_v_amname, __pyx_v_v_handler_name, __pyx_v_v_amtype};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":975
 * 
 * 
 * cdef create_CreateAmStmt(structs.CreateAmStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef tuple v_handler_name = _pg_list_to_tuple(data.handler_name, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateAmStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_amname);
  __Pyx_XDECREF(__pyx_v_v_handler_name);
  __Pyx_XDECREF(__pyx_v_v_amtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":982
 * 
 * 
 * cdef create_CreateTrigStmt(structs.CreateTrigStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_isconstraint = bool(data.isconstraint)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateTrigStmt(CreateTrigStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_v_v_isconstraint = 0;
  PyObject *__pyx_v_v_trigname = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_funcname = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_row = 0;
  PyObject *__pyx_v_v_timing = 0;
  PyObject *__pyx_v_v_events = 0;
  PyObject *__pyx_v_v_columns = 0;
  PyObject *__pyx_v_v_whenClause = 0;
  PyObject *__pyx_v_v_transitionRels = 0;
  PyObject *__pyx_v_v_deferrable = 0;
  PyObject *__pyx_v_v_initdeferred = 0;
  PyObject *__pyx_v_v_constrrel = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTrigStmt", 0);

  /* "pglast/ast.pyx":983
 * 
 * cdef create_CreateTrigStmt(structs.CreateTrigStmt* data, offset_to_index):
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":984
 * cdef create_CreateTrigStmt(structs.CreateTrigStmt* data, offset_to_index):
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_isconstraint = bool(data.isconstraint)             # <<<<<<<<<<<<<<
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isconstraint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isconstraint = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":985
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 */
  if ((__pyx_v_data->trigname != NULL)) {
    __pyx_t_3 = __pyx_v_data->trigname;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_trigname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":986
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":987
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_row = bool(data.row)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funcname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 987, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":988
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_row = bool(data.row)
 *     cdef object v_timing = data.timing
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":989
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_row = bool(data.row)             # <<<<<<<<<<<<<<
 *     cdef object v_timing = data.timing
 *     cdef object v_events = data.events
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_row = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":990
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_row = bool(data.row)
 *     cdef object v_timing = data.timing             # <<<<<<<<<<<<<<
 *     cdef object v_events = data.events
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int16_t(__pyx_v_data->timing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_timing = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":991
 *     cdef object v_row = bool(data.row)
 *     cdef object v_timing = data.timing
 *     cdef object v_events = data.events             # <<<<<<<<<<<<<<
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_whenClause = create(data.whenClause, offset_to_index) if data.whenClause is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_int16_t(__pyx_v_data->events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_events = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":992
 *     cdef object v_timing = data.timing
 *     cdef object v_events = data.events
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whenClause = create(data.whenClause, offset_to_index) if data.whenClause is not NULL else None
 *     cdef tuple v_transitionRels = _pg_list_to_tuple(data.transitionRels, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->columns, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 992, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":993
 *     cdef object v_events = data.events
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_whenClause = create(data.whenClause, offset_to_index) if data.whenClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_transitionRels = _pg_list_to_tuple(data.transitionRels, offset_to_index)
 *     cdef object v_deferrable = bool(data.deferrable)
 */
  if ((__pyx_v_data->whenClause != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whenClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whenClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":994
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_whenClause = create(data.whenClause, offset_to_index) if data.whenClause is not NULL else None
 *     cdef tuple v_transitionRels = _pg_list_to_tuple(data.transitionRels, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->transitionRels, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 994, __pyx_L1_error)
  __pyx_v_v_transitionRels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":995
 *     cdef object v_whenClause = create(data.whenClause, offset_to_index) if data.whenClause is not NULL else None
 *     cdef tuple v_transitionRels = _pg_list_to_tuple(data.transitionRels, offset_to_index)
 *     cdef object v_deferrable = bool(data.deferrable)             # <<<<<<<<<<<<<<
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_constrrel = create(data.constrrel, offset_to_index) if data.constrrel is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->deferrable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferrable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":996
 *     cdef tuple v_transitionRels = _pg_list_to_tuple(data.transitionRels, offset_to_index)
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)             # <<<<<<<<<<<<<<
 *     cdef object v_constrrel = create(data.constrrel, offset_to_index) if data.constrrel is not NULL else None
 *     return ast.CreateTrigStmt(v_replace, v_isconstraint, v_trigname, v_relation, v_funcname, v_args, v_row, v_timing, v_events, v_columns, v_whenClause, v_transitionRels, v_deferrable, v_initdeferred, v_constrrel)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->initdeferred); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initdeferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":997
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_constrrel = create(data.constrrel, offset_to_index) if data.constrrel is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CreateTrigStmt(v_replace, v_isconstraint, v_trigname, v_relation, v_funcname, v_args, v_row, v_timing, v_events, v_columns, v_whenClause, v_transitionRels, v_deferrable, v_initdeferred, v_constrrel)
 * 
 */
  if ((__pyx_v_data->constrrel != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->constrrel, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_constrrel = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":998
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_constrrel = create(data.constrrel, offset_to_index) if data.constrrel is not NULL else None
 *     return ast.CreateTrigStmt(v_replace, v_isconstraint, v_trigname, v_relation, v_funcname, v_args, v_row, v_timing, v_events, v_columns, v_whenClause, v_transitionRels, v_deferrable, v_initdeferred, v_constrrel)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_CreateTrigStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[16] = {__pyx_t_4, __pyx_v_v_replace, __pyx_v_v_isconstraint, __pyx_v_v_trigname, __pyx_v_v_relation, __pyx_v_v_funcname, __pyx_v_v_args, __pyx_v_v_row, __pyx_v_v_timing, __pyx_v_v_events, __pyx_v_v_columns, __pyx_v_v_whenClause, __pyx_v_v_transitionRels, __pyx_v_v_deferrable, __pyx_v_v_initdeferred, __pyx_v_v_constrrel};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 15+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":982
 * 
 * 
 * cdef create_CreateTrigStmt(structs.CreateTrigStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_isconstraint = bool(data.isconstraint)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateTrigStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XDECREF(__pyx_v_v_isconstraint);
  __Pyx_XDECREF(__pyx_v_v_trigname);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_funcname);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_row);
  __Pyx_XDECREF(__pyx_v_v_timing);
  __Pyx_XDECREF(__pyx_v_v_events);
  __Pyx_XDECREF(__pyx_v_v_columns);
  __Pyx_XDECREF(__pyx_v_v_whenClause);
  __Pyx_XDECREF(__pyx_v_v_transitionRels);
  __Pyx_XDECREF(__pyx_v_v_deferrable);
  __Pyx_XDECREF(__pyx_v_v_initdeferred);
  __Pyx_XDECREF(__pyx_v_v_constrrel);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1001
 * 
 * 
 * cdef create_CreateEventTrigStmt(structs.CreateEventTrigStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_eventname = data.eventname.decode("utf-8") if data.eventname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateEventTrigStmt(CreateEventTrigStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_trigname = 0;
  PyObject *__pyx_v_v_eventname = 0;
  PyObject *__pyx_v_v_whenclause = 0;
  PyObject *__pyx_v_v_funcname = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateEventTrigStmt", 0);

  /* "pglast/ast.pyx":1002
 * 
 * cdef create_CreateEventTrigStmt(structs.CreateEventTrigStmt* data, offset_to_index):
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_eventname = data.eventname.decode("utf-8") if data.eventname is not NULL else None
 *     cdef tuple v_whenclause = _pg_list_to_tuple(data.whenclause, offset_to_index)
 */
  if ((__pyx_v_data->trigname != NULL)) {
    __pyx_t_2 = __pyx_v_data->trigname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_trigname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1003
 * cdef create_CreateEventTrigStmt(structs.CreateEventTrigStmt* data, offset_to_index):
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_eventname = data.eventname.decode("utf-8") if data.eventname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_whenclause = _pg_list_to_tuple(data.whenclause, offset_to_index)
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 */
  if ((__pyx_v_data->eventname != NULL)) {
    __pyx_t_4 = __pyx_v_data->eventname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_eventname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1004
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_eventname = data.eventname.decode("utf-8") if data.eventname is not NULL else None
 *     cdef tuple v_whenclause = _pg_list_to_tuple(data.whenclause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     return ast.CreateEventTrigStmt(v_trigname, v_eventname, v_whenclause, v_funcname)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->whenclause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1004, __pyx_L1_error)
  __pyx_v_v_whenclause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1005
 *     cdef object v_eventname = data.eventname.decode("utf-8") if data.eventname is not NULL else None
 *     cdef tuple v_whenclause = _pg_list_to_tuple(data.whenclause, offset_to_index)
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateEventTrigStmt(v_trigname, v_eventname, v_whenclause, v_funcname)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funcname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1005, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1006
 *     cdef tuple v_whenclause = _pg_list_to_tuple(data.whenclause, offset_to_index)
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     return ast.CreateEventTrigStmt(v_trigname, v_eventname, v_whenclause, v_funcname)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateEventTrigStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_trigname, __pyx_v_v_eventname, __pyx_v_v_whenclause, __pyx_v_v_funcname};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1001
 * 
 * 
 * cdef create_CreateEventTrigStmt(structs.CreateEventTrigStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_eventname = data.eventname.decode("utf-8") if data.eventname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateEventTrigStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_trigname);
  __Pyx_XDECREF(__pyx_v_v_eventname);
  __Pyx_XDECREF(__pyx_v_v_whenclause);
  __Pyx_XDECREF(__pyx_v_v_funcname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1009
 * 
 * 
 * cdef create_AlterEventTrigStmt(structs.AlterEventTrigStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_tgenabled = chr(data.tgenabled)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterEventTrigStmt(AlterEventTrigStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_trigname = 0;
  PyObject *__pyx_v_v_tgenabled = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterEventTrigStmt", 0);

  /* "pglast/ast.pyx":1010
 * 
 * cdef create_AlterEventTrigStmt(structs.AlterEventTrigStmt* data, offset_to_index):
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_tgenabled = chr(data.tgenabled)
 *     return ast.AlterEventTrigStmt(v_trigname, v_tgenabled)
 */
  if ((__pyx_v_data->trigname != NULL)) {
    __pyx_t_2 = __pyx_v_data->trigname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_trigname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1011
 * cdef create_AlterEventTrigStmt(structs.AlterEventTrigStmt* data, offset_to_index):
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_tgenabled = chr(data.tgenabled)             # <<<<<<<<<<<<<<
 *     return ast.AlterEventTrigStmt(v_trigname, v_tgenabled)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->tgenabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_tgenabled = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":1012
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_tgenabled = chr(data.tgenabled)
 *     return ast.AlterEventTrigStmt(v_trigname, v_tgenabled)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AlterEventTrigStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_v_trigname, __pyx_v_v_tgenabled};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1009
 * 
 * 
 * cdef create_AlterEventTrigStmt(structs.AlterEventTrigStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_trigname = data.trigname.decode("utf-8") if data.trigname is not NULL else None
 *     cdef object v_tgenabled = chr(data.tgenabled)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterEventTrigStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_trigname);
  __Pyx_XDECREF(__pyx_v_v_tgenabled);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1015
 * 
 * 
 * cdef create_CreatePLangStmt(structs.CreatePLangStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_plname = data.plname.decode("utf-8") if data.plname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreatePLangStmt(CreatePLangStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_v_v_plname = 0;
  PyObject *__pyx_v_v_plhandler = 0;
  PyObject *__pyx_v_v_plinline = 0;
  PyObject *__pyx_v_v_plvalidator = 0;
  PyObject *__pyx_v_v_pltrusted = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatePLangStmt", 0);

  /* "pglast/ast.pyx":1016
 * 
 * cdef create_CreatePLangStmt(structs.CreatePLangStmt* data, offset_to_index):
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     cdef object v_plname = data.plname.decode("utf-8") if data.plname is not NULL else None
 *     cdef tuple v_plhandler = _pg_list_to_tuple(data.plhandler, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1017
 * cdef create_CreatePLangStmt(structs.CreatePLangStmt* data, offset_to_index):
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_plname = data.plname.decode("utf-8") if data.plname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_plhandler = _pg_list_to_tuple(data.plhandler, offset_to_index)
 *     cdef tuple v_plinline = _pg_list_to_tuple(data.plinline, offset_to_index)
 */
  if ((__pyx_v_data->plname != NULL)) {
    __pyx_t_3 = __pyx_v_data->plname;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_plname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1018
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_plname = data.plname.decode("utf-8") if data.plname is not NULL else None
 *     cdef tuple v_plhandler = _pg_list_to_tuple(data.plhandler, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_plinline = _pg_list_to_tuple(data.plinline, offset_to_index)
 *     cdef tuple v_plvalidator = _pg_list_to_tuple(data.plvalidator, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->plhandler, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1018, __pyx_L1_error)
  __pyx_v_v_plhandler = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1019
 *     cdef object v_plname = data.plname.decode("utf-8") if data.plname is not NULL else None
 *     cdef tuple v_plhandler = _pg_list_to_tuple(data.plhandler, offset_to_index)
 *     cdef tuple v_plinline = _pg_list_to_tuple(data.plinline, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_plvalidator = _pg_list_to_tuple(data.plvalidator, offset_to_index)
 *     cdef object v_pltrusted = bool(data.pltrusted)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->plinline, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1019, __pyx_L1_error)
  __pyx_v_v_plinline = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1020
 *     cdef tuple v_plhandler = _pg_list_to_tuple(data.plhandler, offset_to_index)
 *     cdef tuple v_plinline = _pg_list_to_tuple(data.plinline, offset_to_index)
 *     cdef tuple v_plvalidator = _pg_list_to_tuple(data.plvalidator, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_pltrusted = bool(data.pltrusted)
 *     return ast.CreatePLangStmt(v_replace, v_plname, v_plhandler, v_plinline, v_plvalidator, v_pltrusted)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->plvalidator, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1020, __pyx_L1_error)
  __pyx_v_v_plvalidator = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1021
 *     cdef tuple v_plinline = _pg_list_to_tuple(data.plinline, offset_to_index)
 *     cdef tuple v_plvalidator = _pg_list_to_tuple(data.plvalidator, offset_to_index)
 *     cdef object v_pltrusted = bool(data.pltrusted)             # <<<<<<<<<<<<<<
 *     return ast.CreatePLangStmt(v_replace, v_plname, v_plhandler, v_plinline, v_plvalidator, v_pltrusted)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->pltrusted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_pltrusted = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1022
 *     cdef tuple v_plvalidator = _pg_list_to_tuple(data.plvalidator, offset_to_index)
 *     cdef object v_pltrusted = bool(data.pltrusted)
 *     return ast.CreatePLangStmt(v_replace, v_plname, v_plhandler, v_plinline, v_plvalidator, v_pltrusted)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_CreatePLangStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_replace, __pyx_v_v_plname, __pyx_v_v_plhandler, __pyx_v_v_plinline, __pyx_v_v_plvalidator, __pyx_v_v_pltrusted};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1015
 * 
 * 
 * cdef create_CreatePLangStmt(structs.CreatePLangStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_plname = data.plname.decode("utf-8") if data.plname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreatePLangStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XDECREF(__pyx_v_v_plname);
  __Pyx_XDECREF(__pyx_v_v_plhandler);
  __Pyx_XDECREF(__pyx_v_v_plinline);
  __Pyx_XDECREF(__pyx_v_v_plvalidator);
  __Pyx_XDECREF(__pyx_v_v_pltrusted);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1025
 * 
 * 
 * cdef create_CreateRoleStmt(structs.CreateRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_stmt_type = getattr(enums, 'RoleStmtType')(data.stmt_type)
 *     cdef object v_role = data.role.decode("utf-8") if data.role is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateRoleStmt(CreateRoleStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_stmt_type = 0;
  PyObject *__pyx_v_v_role = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateRoleStmt", 0);

  /* "pglast/ast.pyx":1026
 * 
 * cdef create_CreateRoleStmt(structs.CreateRoleStmt* data, offset_to_index):
 *     cdef object v_stmt_type = getattr(enums, 'RoleStmtType')(data.stmt_type)             # <<<<<<<<<<<<<<
 *     cdef object v_role = data.role.decode("utf-8") if data.role is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_RoleStmtType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_RoleStmtType(__pyx_v_data->stmt_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_stmt_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1027
 * cdef create_CreateRoleStmt(structs.CreateRoleStmt* data, offset_to_index):
 *     cdef object v_stmt_type = getattr(enums, 'RoleStmtType')(data.stmt_type)
 *     cdef object v_role = data.role.decode("utf-8") if data.role is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateRoleStmt(v_stmt_type, v_role, v_options)
 */
  if ((__pyx_v_data->role != NULL)) {
    __pyx_t_6 = __pyx_v_data->role;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_role = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1028
 *     cdef object v_stmt_type = getattr(enums, 'RoleStmtType')(data.stmt_type)
 *     cdef object v_role = data.role.decode("utf-8") if data.role is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateRoleStmt(v_stmt_type, v_role, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1028, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1029
 *     cdef object v_role = data.role.decode("utf-8") if data.role is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateRoleStmt(v_stmt_type, v_role, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateRoleStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_stmt_type, __pyx_v_v_role, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __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;

  /* "pglast/ast.pyx":1025
 * 
 * 
 * cdef create_CreateRoleStmt(structs.CreateRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_stmt_type = getattr(enums, 'RoleStmtType')(data.stmt_type)
 *     cdef object v_role = data.role.decode("utf-8") if data.role is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateRoleStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_stmt_type);
  __Pyx_XDECREF(__pyx_v_v_role);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1032
 * 
 * 
 * cdef create_AlterRoleStmt(structs.AlterRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterRoleStmt(AlterRoleStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_role = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_action = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterRoleStmt", 0);

  /* "pglast/ast.pyx":1033
 * 
 * cdef create_AlterRoleStmt(structs.AlterRoleStmt* data, offset_to_index):
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_action = data.action
 */
  if ((__pyx_v_data->role != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->role, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_role = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1034
 * cdef create_AlterRoleStmt(structs.AlterRoleStmt* data, offset_to_index):
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_action = data.action
 *     return ast.AlterRoleStmt(v_role, v_options, v_action)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1034, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1035
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_action = data.action             # <<<<<<<<<<<<<<
 *     return ast.AlterRoleStmt(v_role, v_options, v_action)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->action); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1036
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_action = data.action
 *     return ast.AlterRoleStmt(v_role, v_options, v_action)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterRoleStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_role, __pyx_v_v_options, __pyx_v_v_action};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __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;

  /* "pglast/ast.pyx":1032
 * 
 * 
 * cdef create_AlterRoleStmt(structs.AlterRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlterRoleStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_role);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_action);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1039
 * 
 * 
 * cdef create_AlterRoleSetStmt(structs.AlterRoleSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef object v_database = data.database.decode("utf-8") if data.database is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterRoleSetStmt(AlterRoleSetStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_role = 0;
  PyObject *__pyx_v_v_database = 0;
  PyObject *__pyx_v_v_setstmt = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterRoleSetStmt", 0);

  /* "pglast/ast.pyx":1040
 * 
 * cdef create_AlterRoleSetStmt(structs.AlterRoleSetStmt* data, offset_to_index):
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_database = data.database.decode("utf-8") if data.database is not NULL else None
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 */
  if ((__pyx_v_data->role != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->role, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_role = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1041
 * cdef create_AlterRoleSetStmt(structs.AlterRoleSetStmt* data, offset_to_index):
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef object v_database = data.database.decode("utf-8") if data.database is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 *     return ast.AlterRoleSetStmt(v_role, v_database, v_setstmt)
 */
  if ((__pyx_v_data->database != NULL)) {
    __pyx_t_3 = __pyx_v_data->database;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_database = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1042
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef object v_database = data.database.decode("utf-8") if data.database is not NULL else None
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterRoleSetStmt(v_role, v_database, v_setstmt)
 * 
 */
  if ((__pyx_v_data->setstmt != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setstmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_setstmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1043
 *     cdef object v_database = data.database.decode("utf-8") if data.database is not NULL else None
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 *     return ast.AlterRoleSetStmt(v_role, v_database, v_setstmt)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterRoleSetStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_role, __pyx_v_v_database, __pyx_v_v_setstmt};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1039
 * 
 * 
 * cdef create_AlterRoleSetStmt(structs.AlterRoleSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_role = create(data.role, offset_to_index) if data.role is not NULL else None
 *     cdef object v_database = data.database.decode("utf-8") if data.database is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterRoleSetStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_role);
  __Pyx_XDECREF(__pyx_v_v_database);
  __Pyx_XDECREF(__pyx_v_v_setstmt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1046
 * 
 * 
 * cdef create_DropRoleStmt(structs.DropRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DropRoleStmt(DropRoleStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_roles = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropRoleStmt", 0);

  /* "pglast/ast.pyx":1047
 * 
 * cdef create_DropRoleStmt(structs.DropRoleStmt* data, offset_to_index):
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.DropRoleStmt(v_roles, v_missing_ok)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1047, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1048
 * cdef create_DropRoleStmt(structs.DropRoleStmt* data, offset_to_index):
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.DropRoleStmt(v_roles, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1049
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.DropRoleStmt(v_roles, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DropRoleStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_roles, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1046
 * 
 * 
 * cdef create_DropRoleStmt(structs.DropRoleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_DropRoleStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_roles);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1052
 * 
 * 
 * cdef create_CreateSeqStmt(structs.CreateSeqStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateSeqStmt(CreateSeqStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_sequence = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_for_identity = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateSeqStmt", 0);

  /* "pglast/ast.pyx":1053
 * 
 * cdef create_CreateSeqStmt(structs.CreateSeqStmt* data, offset_to_index):
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_for_identity = bool(data.for_identity)
 */
  if ((__pyx_v_data->sequence != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sequence, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_sequence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1054
 * cdef create_CreateSeqStmt(structs.CreateSeqStmt* data, offset_to_index):
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_for_identity = bool(data.for_identity)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1054, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1055
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_for_identity = bool(data.for_identity)             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateSeqStmt(v_sequence, v_options, v_for_identity, v_if_not_exists)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->for_identity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_identity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1056
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_for_identity = bool(data.for_identity)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     return ast.CreateSeqStmt(v_sequence, v_options, v_for_identity, v_if_not_exists)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1057
 *     cdef object v_for_identity = bool(data.for_identity)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateSeqStmt(v_sequence, v_options, v_for_identity, v_if_not_exists)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CreateSeqStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_sequence, __pyx_v_v_options, __pyx_v_v_for_identity, __pyx_v_v_if_not_exists};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1052
 * 
 * 
 * cdef create_CreateSeqStmt(structs.CreateSeqStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateSeqStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_sequence);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_for_identity);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1060
 * 
 * 
 * cdef create_AlterSeqStmt(structs.AlterSeqStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterSeqStmt(AlterSeqStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_sequence = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_for_identity = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterSeqStmt", 0);

  /* "pglast/ast.pyx":1061
 * 
 * cdef create_AlterSeqStmt(structs.AlterSeqStmt* data, offset_to_index):
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_for_identity = bool(data.for_identity)
 */
  if ((__pyx_v_data->sequence != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sequence, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_sequence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1062
 * cdef create_AlterSeqStmt(structs.AlterSeqStmt* data, offset_to_index):
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_for_identity = bool(data.for_identity)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1062, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1063
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_for_identity = bool(data.for_identity)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterSeqStmt(v_sequence, v_options, v_for_identity, v_missing_ok)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->for_identity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_identity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1064
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_for_identity = bool(data.for_identity)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.AlterSeqStmt(v_sequence, v_options, v_for_identity, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1065
 *     cdef object v_for_identity = bool(data.for_identity)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterSeqStmt(v_sequence, v_options, v_for_identity, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterSeqStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_sequence, __pyx_v_v_options, __pyx_v_v_for_identity, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1060
 * 
 * 
 * cdef create_AlterSeqStmt(structs.AlterSeqStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sequence = create(data.sequence, offset_to_index) if data.sequence is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterSeqStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_sequence);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_for_identity);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1068
 * 
 * 
 * cdef create_DefineStmt(structs.DefineStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'ObjectType')(data.kind)
 *     cdef object v_oldstyle = bool(data.oldstyle)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DefineStmt(DefineStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_oldstyle = 0;
  PyObject *__pyx_v_v_defnames = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_definition = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DefineStmt", 0);

  /* "pglast/ast.pyx":1069
 * 
 * cdef create_DefineStmt(structs.DefineStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'ObjectType')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef object v_oldstyle = bool(data.oldstyle)
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1070
 * cdef create_DefineStmt(structs.DefineStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'ObjectType')(data.kind)
 *     cdef object v_oldstyle = bool(data.oldstyle)             # <<<<<<<<<<<<<<
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->oldstyle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_oldstyle = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1071
 *     cdef object v_kind = getattr(enums, 'ObjectType')(data.kind)
 *     cdef object v_oldstyle = bool(data.oldstyle)
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_definition = _pg_list_to_tuple(data.definition, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->defnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1071, __pyx_L1_error)
  __pyx_v_v_defnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1072
 *     cdef object v_oldstyle = bool(data.oldstyle)
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_definition = _pg_list_to_tuple(data.definition, offset_to_index)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1072, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1073
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_definition = _pg_list_to_tuple(data.definition, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef object v_replace = bool(data.replace)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->definition, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1073, __pyx_L1_error)
  __pyx_v_v_definition = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1074
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_definition = _pg_list_to_tuple(data.definition, offset_to_index)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     return ast.DefineStmt(v_kind, v_oldstyle, v_defnames, v_args, v_definition, v_if_not_exists, v_replace)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1075
 *     cdef tuple v_definition = _pg_list_to_tuple(data.definition, offset_to_index)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     return ast.DefineStmt(v_kind, v_oldstyle, v_defnames, v_args, v_definition, v_if_not_exists, v_replace)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1076
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef object v_replace = bool(data.replace)
 *     return ast.DefineStmt(v_kind, v_oldstyle, v_defnames, v_args, v_definition, v_if_not_exists, v_replace)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DefineStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_oldstyle, __pyx_v_v_defnames, __pyx_v_v_args, __pyx_v_v_definition, __pyx_v_v_if_not_exists, __pyx_v_v_replace};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __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;

  /* "pglast/ast.pyx":1068
 * 
 * 
 * cdef create_DefineStmt(structs.DefineStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'ObjectType')(data.kind)
 *     cdef object v_oldstyle = bool(data.oldstyle)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_DefineStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_oldstyle);
  __Pyx_XDECREF(__pyx_v_v_defnames);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_definition);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1079
 * 
 * 
 * cdef create_CreateDomainStmt(structs.CreateDomainStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_domainname = _pg_list_to_tuple(data.domainname, offset_to_index)
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateDomainStmt(CreateDomainStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_domainname = 0;
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_collClause = 0;
  PyObject *__pyx_v_v_constraints = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateDomainStmt", 0);

  /* "pglast/ast.pyx":1080
 * 
 * cdef create_CreateDomainStmt(structs.CreateDomainStmt* data, offset_to_index):
 *     cdef tuple v_domainname = _pg_list_to_tuple(data.domainname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->domainname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1080, __pyx_L1_error)
  __pyx_v_v_domainname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1081
 * cdef create_CreateDomainStmt(structs.CreateDomainStmt* data, offset_to_index):
 *     cdef tuple v_domainname = _pg_list_to_tuple(data.domainname, offset_to_index)
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 */
  if ((__pyx_v_data->typeName != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_typeName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1082
 *     cdef tuple v_domainname = _pg_list_to_tuple(data.domainname, offset_to_index)
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     return ast.CreateDomainStmt(v_domainname, v_typeName, v_collClause, v_constraints)
 */
  if ((__pyx_v_data->collClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->collClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_collClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1083
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateDomainStmt(v_domainname, v_typeName, v_collClause, v_constraints)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->constraints, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1083, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1084
 *     cdef object v_collClause = create(data.collClause, offset_to_index) if data.collClause is not NULL else None
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     return ast.CreateDomainStmt(v_domainname, v_typeName, v_collClause, v_constraints)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CreateDomainStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_domainname, __pyx_v_v_typeName, __pyx_v_v_collClause, __pyx_v_v_constraints};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __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;

  /* "pglast/ast.pyx":1079
 * 
 * 
 * cdef create_CreateDomainStmt(structs.CreateDomainStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_domainname = _pg_list_to_tuple(data.domainname, offset_to_index)
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CreateDomainStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_domainname);
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_collClause);
  __Pyx_XDECREF(__pyx_v_v_constraints);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1087
 * 
 * 
 * cdef create_CreateOpClassStmt(structs.CreateOpClassStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_opclassname = _pg_list_to_tuple(data.opclassname, offset_to_index)
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateOpClassStmt(CreateOpClassStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_opclassname = 0;
  PyObject *__pyx_v_v_opfamilyname = 0;
  PyObject *__pyx_v_v_amname = 0;
  PyObject *__pyx_v_v_datatype = 0;
  PyObject *__pyx_v_v_items = 0;
  PyObject *__pyx_v_v_isDefault = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateOpClassStmt", 0);

  /* "pglast/ast.pyx":1088
 * 
 * cdef create_CreateOpClassStmt(structs.CreateOpClassStmt* data, offset_to_index):
 *     cdef tuple v_opclassname = _pg_list_to_tuple(data.opclassname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opclassname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1088, __pyx_L1_error)
  __pyx_v_v_opclassname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1089
 * cdef create_CreateOpClassStmt(structs.CreateOpClassStmt* data, offset_to_index):
 *     cdef tuple v_opclassname = _pg_list_to_tuple(data.opclassname, offset_to_index)
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef object v_datatype = create(data.datatype, offset_to_index) if data.datatype is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opfamilyname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1089, __pyx_L1_error)
  __pyx_v_v_opfamilyname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1090
 *     cdef tuple v_opclassname = _pg_list_to_tuple(data.opclassname, offset_to_index)
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_datatype = create(data.datatype, offset_to_index) if data.datatype is not NULL else None
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)
 */
  if ((__pyx_v_data->amname != NULL)) {
    __pyx_t_2 = __pyx_v_data->amname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_amname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1091
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef object v_datatype = create(data.datatype, offset_to_index) if data.datatype is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)
 *     cdef object v_isDefault = bool(data.isDefault)
 */
  if ((__pyx_v_data->datatype != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->datatype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_datatype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1092
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef object v_datatype = create(data.datatype, offset_to_index) if data.datatype is not NULL else None
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_isDefault = bool(data.isDefault)
 *     return ast.CreateOpClassStmt(v_opclassname, v_opfamilyname, v_amname, v_datatype, v_items, v_isDefault)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->items, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1092, __pyx_L1_error)
  __pyx_v_v_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1093
 *     cdef object v_datatype = create(data.datatype, offset_to_index) if data.datatype is not NULL else None
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)
 *     cdef object v_isDefault = bool(data.isDefault)             # <<<<<<<<<<<<<<
 *     return ast.CreateOpClassStmt(v_opclassname, v_opfamilyname, v_amname, v_datatype, v_items, v_isDefault)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isDefault); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isDefault = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1094
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)
 *     cdef object v_isDefault = bool(data.isDefault)
 *     return ast.CreateOpClassStmt(v_opclassname, v_opfamilyname, v_amname, v_datatype, v_items, v_isDefault)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateOpClassStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_opclassname, __pyx_v_v_opfamilyname, __pyx_v_v_amname, __pyx_v_v_datatype, __pyx_v_v_items, __pyx_v_v_isDefault};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1087
 * 
 * 
 * cdef create_CreateOpClassStmt(structs.CreateOpClassStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_opclassname = _pg_list_to_tuple(data.opclassname, offset_to_index)
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateOpClassStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_opclassname);
  __Pyx_XDECREF(__pyx_v_v_opfamilyname);
  __Pyx_XDECREF(__pyx_v_v_amname);
  __Pyx_XDECREF(__pyx_v_v_datatype);
  __Pyx_XDECREF(__pyx_v_v_items);
  __Pyx_XDECREF(__pyx_v_v_isDefault);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1097
 * 
 * 
 * cdef create_CreateOpClassItem(structs.CreateOpClassItem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_itemtype = data.itemtype
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateOpClassItem(CreateOpClassItem *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_itemtype = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_number = 0;
  PyObject *__pyx_v_v_order_family = 0;
  PyObject *__pyx_v_v_class_args = 0;
  PyObject *__pyx_v_v_storedtype = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateOpClassItem", 0);

  /* "pglast/ast.pyx":1098
 * 
 * cdef create_CreateOpClassItem(structs.CreateOpClassItem* data, offset_to_index):
 *     cdef object v_itemtype = data.itemtype             # <<<<<<<<<<<<<<
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 *     cdef object v_number = data.number
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->itemtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_itemtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1099
 * cdef create_CreateOpClassItem(structs.CreateOpClassItem* data, offset_to_index):
 *     cdef object v_itemtype = data.itemtype
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_number = data.number
 *     cdef tuple v_order_family = _pg_list_to_tuple(data.order_family, offset_to_index)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1100
 *     cdef object v_itemtype = data.itemtype
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 *     cdef object v_number = data.number             # <<<<<<<<<<<<<<
 *     cdef tuple v_order_family = _pg_list_to_tuple(data.order_family, offset_to_index)
 *     cdef tuple v_class_args = _pg_list_to_tuple(data.class_args, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_number = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1101
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 *     cdef object v_number = data.number
 *     cdef tuple v_order_family = _pg_list_to_tuple(data.order_family, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_class_args = _pg_list_to_tuple(data.class_args, offset_to_index)
 *     cdef object v_storedtype = create(data.storedtype, offset_to_index) if data.storedtype is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->order_family, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1101, __pyx_L1_error)
  __pyx_v_v_order_family = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1102
 *     cdef object v_number = data.number
 *     cdef tuple v_order_family = _pg_list_to_tuple(data.order_family, offset_to_index)
 *     cdef tuple v_class_args = _pg_list_to_tuple(data.class_args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_storedtype = create(data.storedtype, offset_to_index) if data.storedtype is not NULL else None
 *     return ast.CreateOpClassItem(v_itemtype, v_name, v_number, v_order_family, v_class_args, v_storedtype)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->class_args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1102, __pyx_L1_error)
  __pyx_v_v_class_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1103
 *     cdef tuple v_order_family = _pg_list_to_tuple(data.order_family, offset_to_index)
 *     cdef tuple v_class_args = _pg_list_to_tuple(data.class_args, offset_to_index)
 *     cdef object v_storedtype = create(data.storedtype, offset_to_index) if data.storedtype is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CreateOpClassItem(v_itemtype, v_name, v_number, v_order_family, v_class_args, v_storedtype)
 * 
 */
  if ((__pyx_v_data->storedtype != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->storedtype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_storedtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1104
 *     cdef tuple v_class_args = _pg_list_to_tuple(data.class_args, offset_to_index)
 *     cdef object v_storedtype = create(data.storedtype, offset_to_index) if data.storedtype is not NULL else None
 *     return ast.CreateOpClassItem(v_itemtype, v_name, v_number, v_order_family, v_class_args, v_storedtype)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CreateOpClassItem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_2, __pyx_v_v_itemtype, __pyx_v_v_name, __pyx_v_v_number, __pyx_v_v_order_family, __pyx_v_v_class_args, __pyx_v_v_storedtype};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 6+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __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;

  /* "pglast/ast.pyx":1097
 * 
 * 
 * cdef create_CreateOpClassItem(structs.CreateOpClassItem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_itemtype = data.itemtype
 *     cdef object v_name = create(data.name, offset_to_index) if data.name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CreateOpClassItem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_itemtype);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_number);
  __Pyx_XDECREF(__pyx_v_v_order_family);
  __Pyx_XDECREF(__pyx_v_v_class_args);
  __Pyx_XDECREF(__pyx_v_v_storedtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1107
 * 
 * 
 * cdef create_CreateOpFamilyStmt(structs.CreateOpFamilyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateOpFamilyStmt(CreateOpFamilyStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_opfamilyname = 0;
  PyObject *__pyx_v_v_amname = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateOpFamilyStmt", 0);

  /* "pglast/ast.pyx":1108
 * 
 * cdef create_CreateOpFamilyStmt(structs.CreateOpFamilyStmt* data, offset_to_index):
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     return ast.CreateOpFamilyStmt(v_opfamilyname, v_amname)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opfamilyname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1108, __pyx_L1_error)
  __pyx_v_v_opfamilyname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1109
 * cdef create_CreateOpFamilyStmt(structs.CreateOpFamilyStmt* data, offset_to_index):
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CreateOpFamilyStmt(v_opfamilyname, v_amname)
 * 
 */
  if ((__pyx_v_data->amname != NULL)) {
    __pyx_t_2 = __pyx_v_data->amname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_amname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1110
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     return ast.CreateOpFamilyStmt(v_opfamilyname, v_amname)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateOpFamilyStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_opfamilyname, __pyx_v_v_amname};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1107
 * 
 * 
 * cdef create_CreateOpFamilyStmt(structs.CreateOpFamilyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateOpFamilyStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_opfamilyname);
  __Pyx_XDECREF(__pyx_v_v_amname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1113
 * 
 * 
 * cdef create_AlterOpFamilyStmt(structs.AlterOpFamilyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterOpFamilyStmt(AlterOpFamilyStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_opfamilyname = 0;
  PyObject *__pyx_v_v_amname = 0;
  PyObject *__pyx_v_v_isDrop = 0;
  PyObject *__pyx_v_v_items = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterOpFamilyStmt", 0);

  /* "pglast/ast.pyx":1114
 * 
 * cdef create_AlterOpFamilyStmt(structs.AlterOpFamilyStmt* data, offset_to_index):
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef object v_isDrop = bool(data.isDrop)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opfamilyname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1114, __pyx_L1_error)
  __pyx_v_v_opfamilyname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1115
 * cdef create_AlterOpFamilyStmt(structs.AlterOpFamilyStmt* data, offset_to_index):
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_isDrop = bool(data.isDrop)
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)
 */
  if ((__pyx_v_data->amname != NULL)) {
    __pyx_t_2 = __pyx_v_data->amname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_amname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1116
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef object v_isDrop = bool(data.isDrop)             # <<<<<<<<<<<<<<
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)
 *     return ast.AlterOpFamilyStmt(v_opfamilyname, v_amname, v_isDrop, v_items)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isDrop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isDrop = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1117
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 *     cdef object v_isDrop = bool(data.isDrop)
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterOpFamilyStmt(v_opfamilyname, v_amname, v_isDrop, v_items)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->items, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1117, __pyx_L1_error)
  __pyx_v_v_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1118
 *     cdef object v_isDrop = bool(data.isDrop)
 *     cdef tuple v_items = _pg_list_to_tuple(data.items, offset_to_index)
 *     return ast.AlterOpFamilyStmt(v_opfamilyname, v_amname, v_isDrop, v_items)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterOpFamilyStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_opfamilyname, __pyx_v_v_amname, __pyx_v_v_isDrop, __pyx_v_v_items};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1113
 * 
 * 
 * cdef create_AlterOpFamilyStmt(structs.AlterOpFamilyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_opfamilyname = _pg_list_to_tuple(data.opfamilyname, offset_to_index)
 *     cdef object v_amname = data.amname.decode("utf-8") if data.amname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_AlterOpFamilyStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_opfamilyname);
  __Pyx_XDECREF(__pyx_v_v_amname);
  __Pyx_XDECREF(__pyx_v_v_isDrop);
  __Pyx_XDECREF(__pyx_v_v_items);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1121
 * 
 * 
 * cdef create_DropStmt(structs.DropStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 *     cdef object v_removeType = getattr(enums, 'ObjectType')(data.removeType)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DropStmt(DropStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objects = 0;
  PyObject *__pyx_v_v_removeType = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_v_v_concurrent = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropStmt", 0);

  /* "pglast/ast.pyx":1122
 * 
 * cdef create_DropStmt(structs.DropStmt* data, offset_to_index):
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_removeType = getattr(enums, 'ObjectType')(data.removeType)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->objects, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1122, __pyx_L1_error)
  __pyx_v_v_objects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1123
 * cdef create_DropStmt(structs.DropStmt* data, offset_to_index):
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 *     cdef object v_removeType = getattr(enums, 'ObjectType')(data.removeType)             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->removeType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_removeType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1124
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 *     cdef object v_removeType = getattr(enums, 'ObjectType')(data.removeType)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_concurrent = bool(data.concurrent)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1125
 *     cdef object v_removeType = getattr(enums, 'ObjectType')(data.removeType)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     cdef object v_concurrent = bool(data.concurrent)
 *     return ast.DropStmt(v_objects, v_removeType, v_behavior, v_missing_ok, v_concurrent)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1126
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_concurrent = bool(data.concurrent)             # <<<<<<<<<<<<<<
 *     return ast.DropStmt(v_objects, v_removeType, v_behavior, v_missing_ok, v_concurrent)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->concurrent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_concurrent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1127
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_concurrent = bool(data.concurrent)
 *     return ast.DropStmt(v_objects, v_removeType, v_behavior, v_missing_ok, v_concurrent)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DropStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_objects, __pyx_v_v_removeType, __pyx_v_v_behavior, __pyx_v_v_missing_ok, __pyx_v_v_concurrent};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __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;

  /* "pglast/ast.pyx":1121
 * 
 * 
 * cdef create_DropStmt(structs.DropStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_objects = _pg_list_to_tuple(data.objects, offset_to_index)
 *     cdef object v_removeType = getattr(enums, 'ObjectType')(data.removeType)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_DropStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objects);
  __Pyx_XDECREF(__pyx_v_v_removeType);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XDECREF(__pyx_v_v_concurrent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1130
 * 
 * 
 * cdef create_TruncateStmt(structs.TruncateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_restart_seqs = bool(data.restart_seqs)
 */

static PyObject *__pyx_f_6pglast_6parser_create_TruncateStmt(TruncateStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relations = 0;
  PyObject *__pyx_v_v_restart_seqs = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TruncateStmt", 0);

  /* "pglast/ast.pyx":1131
 * 
 * cdef create_TruncateStmt(structs.TruncateStmt* data, offset_to_index):
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_restart_seqs = bool(data.restart_seqs)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->relations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1131, __pyx_L1_error)
  __pyx_v_v_relations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1132
 * cdef create_TruncateStmt(structs.TruncateStmt* data, offset_to_index):
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_restart_seqs = bool(data.restart_seqs)             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.TruncateStmt(v_relations, v_restart_seqs, v_behavior)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->restart_seqs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_restart_seqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1133
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_restart_seqs = bool(data.restart_seqs)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     return ast.TruncateStmt(v_relations, v_restart_seqs, v_behavior)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1134
 *     cdef object v_restart_seqs = bool(data.restart_seqs)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.TruncateStmt(v_relations, v_restart_seqs, v_behavior)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TruncateStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_relations, __pyx_v_v_restart_seqs, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __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;

  /* "pglast/ast.pyx":1130
 * 
 * 
 * cdef create_TruncateStmt(structs.TruncateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_restart_seqs = bool(data.restart_seqs)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_TruncateStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relations);
  __Pyx_XDECREF(__pyx_v_v_restart_seqs);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1137
 * 
 * 
 * cdef create_CommentStmt(structs.CommentStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CommentStmt(CommentStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_object = 0;
  PyObject *__pyx_v_v_comment = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CommentStmt", 0);

  /* "pglast/ast.pyx":1138
 * 
 * cdef create_CommentStmt(structs.CommentStmt* data, offset_to_index):
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_comment = data.comment.decode("utf-8") if data.comment is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1139
 * cdef create_CommentStmt(structs.CommentStmt* data, offset_to_index):
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_comment = data.comment.decode("utf-8") if data.comment is not NULL else None
 *     return ast.CommentStmt(v_objtype, v_object, v_comment)
 */
  if ((__pyx_v_data->object != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1140
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_comment = data.comment.decode("utf-8") if data.comment is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CommentStmt(v_objtype, v_object, v_comment)
 * 
 */
  if ((__pyx_v_data->comment != NULL)) {
    __pyx_t_6 = __pyx_v_data->comment;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_comment = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1141
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_comment = data.comment.decode("utf-8") if data.comment is not NULL else None
 *     return ast.CommentStmt(v_objtype, v_object, v_comment)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CommentStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_objtype, __pyx_v_v_object, __pyx_v_v_comment};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __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;

  /* "pglast/ast.pyx":1137
 * 
 * 
 * cdef create_CommentStmt(structs.CommentStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CommentStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_object);
  __Pyx_XDECREF(__pyx_v_v_comment);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1144
 * 
 * 
 * cdef create_SecLabelStmt(structs.SecLabelStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_SecLabelStmt(SecLabelStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_object = 0;
  PyObject *__pyx_v_v_provider = 0;
  PyObject *__pyx_v_v_label = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SecLabelStmt", 0);

  /* "pglast/ast.pyx":1145
 * 
 * cdef create_SecLabelStmt(structs.SecLabelStmt* data, offset_to_index):
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_provider = data.provider.decode("utf-8") if data.provider is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1146
 * cdef create_SecLabelStmt(structs.SecLabelStmt* data, offset_to_index):
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_provider = data.provider.decode("utf-8") if data.provider is not NULL else None
 *     cdef object v_label = data.label.decode("utf-8") if data.label is not NULL else None
 */
  if ((__pyx_v_data->object != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1147
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_provider = data.provider.decode("utf-8") if data.provider is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_label = data.label.decode("utf-8") if data.label is not NULL else None
 *     return ast.SecLabelStmt(v_objtype, v_object, v_provider, v_label)
 */
  if ((__pyx_v_data->provider != NULL)) {
    __pyx_t_6 = __pyx_v_data->provider;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_provider = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1148
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_provider = data.provider.decode("utf-8") if data.provider is not NULL else None
 *     cdef object v_label = data.label.decode("utf-8") if data.label is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.SecLabelStmt(v_objtype, v_object, v_provider, v_label)
 * 
 */
  if ((__pyx_v_data->label != NULL)) {
    __pyx_t_7 = __pyx_v_data->label;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_label = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1149
 *     cdef object v_provider = data.provider.decode("utf-8") if data.provider is not NULL else None
 *     cdef object v_label = data.label.decode("utf-8") if data.label is not NULL else None
 *     return ast.SecLabelStmt(v_objtype, v_object, v_provider, v_label)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SecLabelStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_objtype, __pyx_v_v_object, __pyx_v_v_provider, __pyx_v_v_label};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __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;

  /* "pglast/ast.pyx":1144
 * 
 * 
 * cdef create_SecLabelStmt(structs.SecLabelStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SecLabelStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_object);
  __Pyx_XDECREF(__pyx_v_v_provider);
  __Pyx_XDECREF(__pyx_v_v_label);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1152
 * 
 * 
 * cdef create_DeclareCursorStmt(structs.DeclareCursorStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     cdef object v_options = data.options
 */

static PyObject *__pyx_f_6pglast_6parser_create_DeclareCursorStmt(DeclareCursorStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_portalname = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_query = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DeclareCursorStmt", 0);

  /* "pglast/ast.pyx":1153
 * 
 * cdef create_DeclareCursorStmt(structs.DeclareCursorStmt* data, offset_to_index):
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_options = data.options
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 */
  if ((__pyx_v_data->portalname != NULL)) {
    __pyx_t_2 = __pyx_v_data->portalname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_portalname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1154
 * cdef create_DeclareCursorStmt(structs.DeclareCursorStmt* data, offset_to_index):
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     cdef object v_options = data.options             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     return ast.DeclareCursorStmt(v_portalname, v_options, v_query)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_options = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1155
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     cdef object v_options = data.options
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.DeclareCursorStmt(v_portalname, v_options, v_query)
 * 
 */
  if ((__pyx_v_data->query != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_query = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1156
 *     cdef object v_options = data.options
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     return ast.DeclareCursorStmt(v_portalname, v_options, v_query)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DeclareCursorStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_portalname, __pyx_v_v_options, __pyx_v_v_query};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1152
 * 
 * 
 * cdef create_DeclareCursorStmt(structs.DeclareCursorStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     cdef object v_options = data.options
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_DeclareCursorStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_portalname);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_query);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1159
 * 
 * 
 * cdef create_ClosePortalStmt(structs.ClosePortalStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     return ast.ClosePortalStmt(v_portalname)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ClosePortalStmt(ClosePortalStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_portalname = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ClosePortalStmt", 0);

  /* "pglast/ast.pyx":1160
 * 
 * cdef create_ClosePortalStmt(structs.ClosePortalStmt* data, offset_to_index):
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.ClosePortalStmt(v_portalname)
 * 
 */
  if ((__pyx_v_data->portalname != NULL)) {
    __pyx_t_2 = __pyx_v_data->portalname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_portalname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1161
 * cdef create_ClosePortalStmt(structs.ClosePortalStmt* data, offset_to_index):
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     return ast.ClosePortalStmt(v_portalname)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ClosePortalStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_portalname};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1159
 * 
 * 
 * cdef create_ClosePortalStmt(structs.ClosePortalStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     return ast.ClosePortalStmt(v_portalname)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ClosePortalStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_portalname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1164
 * 
 * 
 * cdef create_FetchStmt(structs.FetchStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_direction = getattr(enums, 'FetchDirection')(data.direction)
 *     cdef object v_howMany = data.howMany
 */

static PyObject *__pyx_f_6pglast_6parser_create_FetchStmt(FetchStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_direction = 0;
  PyObject *__pyx_v_v_howMany = 0;
  PyObject *__pyx_v_v_portalname = 0;
  PyObject *__pyx_v_v_ismove = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FetchStmt", 0);

  /* "pglast/ast.pyx":1165
 * 
 * cdef create_FetchStmt(structs.FetchStmt* data, offset_to_index):
 *     cdef object v_direction = getattr(enums, 'FetchDirection')(data.direction)             # <<<<<<<<<<<<<<
 *     cdef object v_howMany = data.howMany
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_FetchDirection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_FetchDirection(__pyx_v_data->direction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_direction = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1166
 * cdef create_FetchStmt(structs.FetchStmt* data, offset_to_index):
 *     cdef object v_direction = getattr(enums, 'FetchDirection')(data.direction)
 *     cdef object v_howMany = data.howMany             # <<<<<<<<<<<<<<
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     cdef object v_ismove = bool(data.ismove)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_data->howMany); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_howMany = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1167
 *     cdef object v_direction = getattr(enums, 'FetchDirection')(data.direction)
 *     cdef object v_howMany = data.howMany
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_ismove = bool(data.ismove)
 *     return ast.FetchStmt(v_direction, v_howMany, v_portalname, v_ismove)
 */
  if ((__pyx_v_data->portalname != NULL)) {
    __pyx_t_6 = __pyx_v_data->portalname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_portalname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1168
 *     cdef object v_howMany = data.howMany
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     cdef object v_ismove = bool(data.ismove)             # <<<<<<<<<<<<<<
 *     return ast.FetchStmt(v_direction, v_howMany, v_portalname, v_ismove)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->ismove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ismove = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1169
 *     cdef object v_portalname = data.portalname.decode("utf-8") if data.portalname is not NULL else None
 *     cdef object v_ismove = bool(data.ismove)
 *     return ast.FetchStmt(v_direction, v_howMany, v_portalname, v_ismove)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_FetchStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_direction, __pyx_v_v_howMany, __pyx_v_v_portalname, __pyx_v_v_ismove};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __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;

  /* "pglast/ast.pyx":1164
 * 
 * 
 * cdef create_FetchStmt(structs.FetchStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_direction = getattr(enums, 'FetchDirection')(data.direction)
 *     cdef object v_howMany = data.howMany
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_FetchStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_direction);
  __Pyx_XDECREF(__pyx_v_v_howMany);
  __Pyx_XDECREF(__pyx_v_v_portalname);
  __Pyx_XDECREF(__pyx_v_v_ismove);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1172
 * 
 * 
 * cdef create_IndexStmt(structs.IndexStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_idxname = data.idxname.decode("utf-8") if data.idxname is not NULL else None
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_IndexStmt(IndexStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_idxname = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_accessMethod = 0;
  PyObject *__pyx_v_v_tableSpace = 0;
  PyObject *__pyx_v_v_indexParams = 0;
  PyObject *__pyx_v_v_indexIncludingParams = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_excludeOpNames = 0;
  PyObject *__pyx_v_v_idxcomment = 0;
  PyObject *__pyx_v_v_oldCreateSubid = 0;
  PyObject *__pyx_v_v_oldFirstRelfilenodeSubid = 0;
  PyObject *__pyx_v_v_unique = 0;
  PyObject *__pyx_v_v_nulls_not_distinct = 0;
  PyObject *__pyx_v_v_primary = 0;
  PyObject *__pyx_v_v_isconstraint = 0;
  PyObject *__pyx_v_v_deferrable = 0;
  PyObject *__pyx_v_v_initdeferred = 0;
  PyObject *__pyx_v_v_transformed = 0;
  PyObject *__pyx_v_v_concurrent = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_v_v_reset_default_tblspc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  char const *__pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_IndexStmt", 0);

  /* "pglast/ast.pyx":1173
 * 
 * cdef create_IndexStmt(structs.IndexStmt* data, offset_to_index):
 *     cdef object v_idxname = data.idxname.decode("utf-8") if data.idxname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 */
  if ((__pyx_v_data->idxname != NULL)) {
    __pyx_t_2 = __pyx_v_data->idxname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_idxname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1174
 * cdef create_IndexStmt(structs.IndexStmt* data, offset_to_index):
 *     cdef object v_idxname = data.idxname.decode("utf-8") if data.idxname is not NULL else None
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef object v_tableSpace = data.tableSpace.decode("utf-8") if data.tableSpace is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1175
 *     cdef object v_idxname = data.idxname.decode("utf-8") if data.idxname is not NULL else None
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_tableSpace = data.tableSpace.decode("utf-8") if data.tableSpace is not NULL else None
 *     cdef tuple v_indexParams = _pg_list_to_tuple(data.indexParams, offset_to_index)
 */
  if ((__pyx_v_data->accessMethod != NULL)) {
    __pyx_t_4 = __pyx_v_data->accessMethod;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_accessMethod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1176
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef object v_tableSpace = data.tableSpace.decode("utf-8") if data.tableSpace is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_indexParams = _pg_list_to_tuple(data.indexParams, offset_to_index)
 *     cdef tuple v_indexIncludingParams = _pg_list_to_tuple(data.indexIncludingParams, offset_to_index)
 */
  if ((__pyx_v_data->tableSpace != NULL)) {
    __pyx_t_5 = __pyx_v_data->tableSpace;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tableSpace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1177
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef object v_tableSpace = data.tableSpace.decode("utf-8") if data.tableSpace is not NULL else None
 *     cdef tuple v_indexParams = _pg_list_to_tuple(data.indexParams, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_indexIncludingParams = _pg_list_to_tuple(data.indexIncludingParams, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->indexParams, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1177, __pyx_L1_error)
  __pyx_v_v_indexParams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1178
 *     cdef object v_tableSpace = data.tableSpace.decode("utf-8") if data.tableSpace is not NULL else None
 *     cdef tuple v_indexParams = _pg_list_to_tuple(data.indexParams, offset_to_index)
 *     cdef tuple v_indexIncludingParams = _pg_list_to_tuple(data.indexIncludingParams, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->indexIncludingParams, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1178, __pyx_L1_error)
  __pyx_v_v_indexIncludingParams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1179
 *     cdef tuple v_indexParams = _pg_list_to_tuple(data.indexParams, offset_to_index)
 *     cdef tuple v_indexIncludingParams = _pg_list_to_tuple(data.indexIncludingParams, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_excludeOpNames = _pg_list_to_tuple(data.excludeOpNames, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1179, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1180
 *     cdef tuple v_indexIncludingParams = _pg_list_to_tuple(data.indexIncludingParams, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_excludeOpNames = _pg_list_to_tuple(data.excludeOpNames, offset_to_index)
 *     cdef object v_idxcomment = data.idxcomment.decode("utf-8") if data.idxcomment is not NULL else None
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1181
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_excludeOpNames = _pg_list_to_tuple(data.excludeOpNames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_idxcomment = data.idxcomment.decode("utf-8") if data.idxcomment is not NULL else None
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->excludeOpNames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_v_v_excludeOpNames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1182
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_excludeOpNames = _pg_list_to_tuple(data.excludeOpNames, offset_to_index)
 *     cdef object v_idxcomment = data.idxcomment.decode("utf-8") if data.idxcomment is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
 *     cdef object v_oldFirstRelfilenodeSubid = data.oldFirstRelfilenodeSubid
 */
  if ((__pyx_v_data->idxcomment != NULL)) {
    __pyx_t_6 = __pyx_v_data->idxcomment;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_idxcomment = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1183
 *     cdef tuple v_excludeOpNames = _pg_list_to_tuple(data.excludeOpNames, offset_to_index)
 *     cdef object v_idxcomment = data.idxcomment.decode("utf-8") if data.idxcomment is not NULL else None
 *     cdef object v_oldCreateSubid = data.oldCreateSubid             # <<<<<<<<<<<<<<
 *     cdef object v_oldFirstRelfilenodeSubid = data.oldFirstRelfilenodeSubid
 *     cdef object v_unique = bool(data.unique)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->oldCreateSubid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_oldCreateSubid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1184
 *     cdef object v_idxcomment = data.idxcomment.decode("utf-8") if data.idxcomment is not NULL else None
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
 *     cdef object v_oldFirstRelfilenodeSubid = data.oldFirstRelfilenodeSubid             # <<<<<<<<<<<<<<
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->oldFirstRelfilenodeSubid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_oldFirstRelfilenodeSubid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1185
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
 *     cdef object v_oldFirstRelfilenodeSubid = data.oldFirstRelfilenodeSubid
 *     cdef object v_unique = bool(data.unique)             # <<<<<<<<<<<<<<
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 *     cdef object v_primary = bool(data.primary)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->unique); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unique = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1186
 *     cdef object v_oldFirstRelfilenodeSubid = data.oldFirstRelfilenodeSubid
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)             # <<<<<<<<<<<<<<
 *     cdef object v_primary = bool(data.primary)
 *     cdef object v_isconstraint = bool(data.isconstraint)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->nulls_not_distinct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nulls_not_distinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1187
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 *     cdef object v_primary = bool(data.primary)             # <<<<<<<<<<<<<<
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_deferrable = bool(data.deferrable)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->primary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_primary = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1188
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
 *     cdef object v_primary = bool(data.primary)
 *     cdef object v_isconstraint = bool(data.isconstraint)             # <<<<<<<<<<<<<<
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isconstraint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isconstraint = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1189
 *     cdef object v_primary = bool(data.primary)
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_deferrable = bool(data.deferrable)             # <<<<<<<<<<<<<<
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_transformed = bool(data.transformed)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->deferrable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferrable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1190
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)             # <<<<<<<<<<<<<<
 *     cdef object v_transformed = bool(data.transformed)
 *     cdef object v_concurrent = bool(data.concurrent)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->initdeferred); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initdeferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1191
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_transformed = bool(data.transformed)             # <<<<<<<<<<<<<<
 *     cdef object v_concurrent = bool(data.concurrent)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->transformed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_transformed = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1192
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_transformed = bool(data.transformed)
 *     cdef object v_concurrent = bool(data.concurrent)             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->concurrent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_concurrent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1193
 *     cdef object v_transformed = bool(data.transformed)
 *     cdef object v_concurrent = bool(data.concurrent)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)
 *     return ast.IndexStmt(v_idxname, v_relation, v_accessMethod, v_tableSpace, v_indexParams, v_indexIncludingParams, v_options, v_whereClause, v_excludeOpNames, v_idxcomment, v_oldCreateSubid, v_oldFirstRelfilenodeSubid, v_unique, v_nulls_not_distinct, v_primary, v_isconstraint, v_deferrable, v_initdeferred, v_transformed, v_concurrent, v_if_not_exists, v_reset_default_tblspc)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1194
 *     cdef object v_concurrent = bool(data.concurrent)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)             # <<<<<<<<<<<<<<
 *     return ast.IndexStmt(v_idxname, v_relation, v_accessMethod, v_tableSpace, v_indexParams, v_indexIncludingParams, v_options, v_whereClause, v_excludeOpNames, v_idxcomment, v_oldCreateSubid, v_oldFirstRelfilenodeSubid, v_unique, v_nulls_not_distinct, v_primary, v_isconstraint, v_deferrable, v_initdeferred, v_transformed, v_concurrent, v_if_not_exists, v_reset_default_tblspc)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->reset_default_tblspc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_reset_default_tblspc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1195
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     cdef object v_reset_default_tblspc = bool(data.reset_default_tblspc)
 *     return ast.IndexStmt(v_idxname, v_relation, v_accessMethod, v_tableSpace, v_indexParams, v_indexIncludingParams, v_options, v_whereClause, v_excludeOpNames, v_idxcomment, v_oldCreateSubid, v_oldFirstRelfilenodeSubid, v_unique, v_nulls_not_distinct, v_primary, v_isconstraint, v_deferrable, v_initdeferred, v_transformed, v_concurrent, v_if_not_exists, v_reset_default_tblspc)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_IndexStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[23] = {__pyx_t_3, __pyx_v_v_idxname, __pyx_v_v_relation, __pyx_v_v_accessMethod, __pyx_v_v_tableSpace, __pyx_v_v_indexParams, __pyx_v_v_indexIncludingParams, __pyx_v_v_options, __pyx_v_v_whereClause, __pyx_v_v_excludeOpNames, __pyx_v_v_idxcomment, __pyx_v_v_oldCreateSubid, __pyx_v_v_oldFirstRelfilenodeSubid, __pyx_v_v_unique, __pyx_v_v_nulls_not_distinct, __pyx_v_v_primary, __pyx_v_v_isconstraint, __pyx_v_v_deferrable, __pyx_v_v_initdeferred, __pyx_v_v_transformed, __pyx_v_v_concurrent, __pyx_v_v_if_not_exists, __pyx_v_v_reset_default_tblspc};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 22+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1172
 * 
 * 
 * cdef create_IndexStmt(structs.IndexStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_idxname = data.idxname.decode("utf-8") if data.idxname is not NULL else None
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pglast.parser.create_IndexStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_idxname);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_accessMethod);
  __Pyx_XDECREF(__pyx_v_v_tableSpace);
  __Pyx_XDECREF(__pyx_v_v_indexParams);
  __Pyx_XDECREF(__pyx_v_v_indexIncludingParams);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_excludeOpNames);
  __Pyx_XDECREF(__pyx_v_v_idxcomment);
  __Pyx_XDECREF(__pyx_v_v_oldCreateSubid);
  __Pyx_XDECREF(__pyx_v_v_oldFirstRelfilenodeSubid);
  __Pyx_XDECREF(__pyx_v_v_unique);
  __Pyx_XDECREF(__pyx_v_v_nulls_not_distinct);
  __Pyx_XDECREF(__pyx_v_v_primary);
  __Pyx_XDECREF(__pyx_v_v_isconstraint);
  __Pyx_XDECREF(__pyx_v_v_deferrable);
  __Pyx_XDECREF(__pyx_v_v_initdeferred);
  __Pyx_XDECREF(__pyx_v_v_transformed);
  __Pyx_XDECREF(__pyx_v_v_concurrent);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XDECREF(__pyx_v_v_reset_default_tblspc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1198
 * 
 * 
 * cdef create_CreateStatsStmt(structs.CreateStatsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef tuple v_stat_types = _pg_list_to_tuple(data.stat_types, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateStatsStmt(CreateStatsStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_defnames = 0;
  PyObject *__pyx_v_v_stat_types = 0;
  PyObject *__pyx_v_v_exprs = 0;
  PyObject *__pyx_v_v_relations = 0;
  PyObject *__pyx_v_v_stxcomment = 0;
  PyObject *__pyx_v_v_transformed = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateStatsStmt", 0);

  /* "pglast/ast.pyx":1199
 * 
 * cdef create_CreateStatsStmt(structs.CreateStatsStmt* data, offset_to_index):
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_stat_types = _pg_list_to_tuple(data.stat_types, offset_to_index)
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->defnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1199, __pyx_L1_error)
  __pyx_v_v_defnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1200
 * cdef create_CreateStatsStmt(structs.CreateStatsStmt* data, offset_to_index):
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef tuple v_stat_types = _pg_list_to_tuple(data.stat_types, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->stat_types, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1200, __pyx_L1_error)
  __pyx_v_v_stat_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1201
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef tuple v_stat_types = _pg_list_to_tuple(data.stat_types, offset_to_index)
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_stxcomment = data.stxcomment.decode("utf-8") if data.stxcomment is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->exprs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1201, __pyx_L1_error)
  __pyx_v_v_exprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1202
 *     cdef tuple v_stat_types = _pg_list_to_tuple(data.stat_types, offset_to_index)
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_stxcomment = data.stxcomment.decode("utf-8") if data.stxcomment is not NULL else None
 *     cdef object v_transformed = bool(data.transformed)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->relations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_v_v_relations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1203
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_stxcomment = data.stxcomment.decode("utf-8") if data.stxcomment is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_transformed = bool(data.transformed)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  if ((__pyx_v_data->stxcomment != NULL)) {
    __pyx_t_2 = __pyx_v_data->stxcomment;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_stxcomment = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1204
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_stxcomment = data.stxcomment.decode("utf-8") if data.stxcomment is not NULL else None
 *     cdef object v_transformed = bool(data.transformed)             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateStatsStmt(v_defnames, v_stat_types, v_exprs, v_relations, v_stxcomment, v_transformed, v_if_not_exists)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->transformed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_transformed = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1205
 *     cdef object v_stxcomment = data.stxcomment.decode("utf-8") if data.stxcomment is not NULL else None
 *     cdef object v_transformed = bool(data.transformed)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     return ast.CreateStatsStmt(v_defnames, v_stat_types, v_exprs, v_relations, v_stxcomment, v_transformed, v_if_not_exists)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1206
 *     cdef object v_transformed = bool(data.transformed)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateStatsStmt(v_defnames, v_stat_types, v_exprs, v_relations, v_stxcomment, v_transformed, v_if_not_exists)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateStatsStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_defnames, __pyx_v_v_stat_types, __pyx_v_v_exprs, __pyx_v_v_relations, __pyx_v_v_stxcomment, __pyx_v_v_transformed, __pyx_v_v_if_not_exists};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 7+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1198
 * 
 * 
 * cdef create_CreateStatsStmt(structs.CreateStatsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef tuple v_stat_types = _pg_list_to_tuple(data.stat_types, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateStatsStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_defnames);
  __Pyx_XDECREF(__pyx_v_v_stat_types);
  __Pyx_XDECREF(__pyx_v_v_exprs);
  __Pyx_XDECREF(__pyx_v_v_relations);
  __Pyx_XDECREF(__pyx_v_v_stxcomment);
  __Pyx_XDECREF(__pyx_v_v_transformed);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1209
 * 
 * 
 * cdef create_StatsElem(structs.StatsElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_StatsElem(StatsElem *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_StatsElem", 0);

  /* "pglast/ast.pyx":1210
 * 
 * cdef create_StatsElem(structs.StatsElem* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     return ast.StatsElem(v_name, v_expr)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1211
 * cdef create_StatsElem(structs.StatsElem* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.StatsElem(v_name, v_expr)
 * 
 */
  if ((__pyx_v_data->expr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1212
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     return ast.StatsElem(v_name, v_expr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_StatsElem); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_name, __pyx_v_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1209
 * 
 * 
 * cdef create_StatsElem(structs.StatsElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_StatsElem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1215
 * 
 * 
 * cdef create_AlterStatsStmt(structs.AlterStatsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef object v_stxstattarget = data.stxstattarget
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterStatsStmt(AlterStatsStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_defnames = 0;
  PyObject *__pyx_v_v_stxstattarget = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterStatsStmt", 0);

  /* "pglast/ast.pyx":1216
 * 
 * cdef create_AlterStatsStmt(structs.AlterStatsStmt* data, offset_to_index):
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_stxstattarget = data.stxstattarget
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->defnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1216, __pyx_L1_error)
  __pyx_v_v_defnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1217
 * cdef create_AlterStatsStmt(structs.AlterStatsStmt* data, offset_to_index):
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef object v_stxstattarget = data.stxstattarget             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterStatsStmt(v_defnames, v_stxstattarget, v_missing_ok)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->stxstattarget); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_stxstattarget = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1218
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef object v_stxstattarget = data.stxstattarget
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.AlterStatsStmt(v_defnames, v_stxstattarget, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1219
 *     cdef object v_stxstattarget = data.stxstattarget
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterStatsStmt(v_defnames, v_stxstattarget, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterStatsStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_defnames, __pyx_v_v_stxstattarget, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1215
 * 
 * 
 * cdef create_AlterStatsStmt(structs.AlterStatsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef object v_stxstattarget = data.stxstattarget
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterStatsStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_defnames);
  __Pyx_XDECREF(__pyx_v_v_stxstattarget);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1222
 * 
 * 
 * cdef create_CreateFunctionStmt(structs.CreateFunctionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_is_procedure = bool(data.is_procedure)
 *     cdef object v_replace = bool(data.replace)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateFunctionStmt(CreateFunctionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_is_procedure = 0;
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_v_v_funcname = 0;
  PyObject *__pyx_v_v_parameters = 0;
  PyObject *__pyx_v_v_returnType = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_sql_body = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateFunctionStmt", 0);

  /* "pglast/ast.pyx":1223
 * 
 * cdef create_CreateFunctionStmt(structs.CreateFunctionStmt* data, offset_to_index):
 *     cdef object v_is_procedure = bool(data.is_procedure)             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_procedure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_procedure = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1224
 * cdef create_CreateFunctionStmt(structs.CreateFunctionStmt* data, offset_to_index):
 *     cdef object v_is_procedure = bool(data.is_procedure)
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_parameters = _pg_list_to_tuple(data.parameters, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1225
 *     cdef object v_is_procedure = bool(data.is_procedure)
 *     cdef object v_replace = bool(data.replace)
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_parameters = _pg_list_to_tuple(data.parameters, offset_to_index)
 *     cdef object v_returnType = create(data.returnType, offset_to_index) if data.returnType is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->funcname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1225, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1226
 *     cdef object v_replace = bool(data.replace)
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_parameters = _pg_list_to_tuple(data.parameters, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_returnType = create(data.returnType, offset_to_index) if data.returnType is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->parameters, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1226, __pyx_L1_error)
  __pyx_v_v_parameters = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1227
 *     cdef tuple v_funcname = _pg_list_to_tuple(data.funcname, offset_to_index)
 *     cdef tuple v_parameters = _pg_list_to_tuple(data.parameters, offset_to_index)
 *     cdef object v_returnType = create(data.returnType, offset_to_index) if data.returnType is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_sql_body = create(data.sql_body, offset_to_index) if data.sql_body is not NULL else None
 */
  if ((__pyx_v_data->returnType != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returnType, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_returnType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1228
 *     cdef tuple v_parameters = _pg_list_to_tuple(data.parameters, offset_to_index)
 *     cdef object v_returnType = create(data.returnType, offset_to_index) if data.returnType is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_sql_body = create(data.sql_body, offset_to_index) if data.sql_body is not NULL else None
 *     return ast.CreateFunctionStmt(v_is_procedure, v_replace, v_funcname, v_parameters, v_returnType, v_options, v_sql_body)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1228, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1229
 *     cdef object v_returnType = create(data.returnType, offset_to_index) if data.returnType is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_sql_body = create(data.sql_body, offset_to_index) if data.sql_body is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CreateFunctionStmt(v_is_procedure, v_replace, v_funcname, v_parameters, v_returnType, v_options, v_sql_body)
 * 
 */
  if ((__pyx_v_data->sql_body != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sql_body, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_sql_body = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1230
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_sql_body = create(data.sql_body, offset_to_index) if data.sql_body is not NULL else None
 *     return ast.CreateFunctionStmt(v_is_procedure, v_replace, v_funcname, v_parameters, v_returnType, v_options, v_sql_body)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateFunctionStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_is_procedure, __pyx_v_v_replace, __pyx_v_v_funcname, __pyx_v_v_parameters, __pyx_v_v_returnType, __pyx_v_v_options, __pyx_v_v_sql_body};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1222
 * 
 * 
 * cdef create_CreateFunctionStmt(structs.CreateFunctionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_is_procedure = bool(data.is_procedure)
 *     cdef object v_replace = bool(data.replace)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateFunctionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_is_procedure);
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XDECREF(__pyx_v_v_funcname);
  __Pyx_XDECREF(__pyx_v_v_parameters);
  __Pyx_XDECREF(__pyx_v_v_returnType);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_sql_body);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1233
 * 
 * 
 * cdef create_FunctionParameter(structs.FunctionParameter* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_argType = create(data.argType, offset_to_index) if data.argType is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_FunctionParameter(FunctionParameter *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_argType = 0;
  PyObject *__pyx_v_v_mode = 0;
  PyObject *__pyx_v_v_defexpr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FunctionParameter", 0);

  /* "pglast/ast.pyx":1234
 * 
 * cdef create_FunctionParameter(structs.FunctionParameter* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_argType = create(data.argType, offset_to_index) if data.argType is not NULL else None
 *     cdef object v_mode = getattr(enums, 'FunctionParameterMode')(chr(data.mode))
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1235
 * cdef create_FunctionParameter(structs.FunctionParameter* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_argType = create(data.argType, offset_to_index) if data.argType is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_mode = getattr(enums, 'FunctionParameterMode')(chr(data.mode))
 *     cdef object v_defexpr = create(data.defexpr, offset_to_index) if data.defexpr is not NULL else None
 */
  if ((__pyx_v_data->argType != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->argType, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_argType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1236
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_argType = create(data.argType, offset_to_index) if data.argType is not NULL else None
 *     cdef object v_mode = getattr(enums, 'FunctionParameterMode')(chr(data.mode))             # <<<<<<<<<<<<<<
 *     cdef object v_defexpr = create(data.defexpr, offset_to_index) if data.defexpr is not NULL else None
 *     return ast.FunctionParameter(v_name, v_argType, v_mode, v_defexpr)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_FunctionParameterMode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_FunctionParameterMode(__pyx_v_data->mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_mode = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1237
 *     cdef object v_argType = create(data.argType, offset_to_index) if data.argType is not NULL else None
 *     cdef object v_mode = getattr(enums, 'FunctionParameterMode')(chr(data.mode))
 *     cdef object v_defexpr = create(data.defexpr, offset_to_index) if data.defexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.FunctionParameter(v_name, v_argType, v_mode, v_defexpr)
 * 
 */
  if ((__pyx_v_data->defexpr != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->defexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_defexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1238
 *     cdef object v_mode = getattr(enums, 'FunctionParameterMode')(chr(data.mode))
 *     cdef object v_defexpr = create(data.defexpr, offset_to_index) if data.defexpr is not NULL else None
 *     return ast.FunctionParameter(v_name, v_argType, v_mode, v_defexpr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FunctionParameter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_name, __pyx_v_v_argType, __pyx_v_v_mode, __pyx_v_v_defexpr};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1233
 * 
 * 
 * cdef create_FunctionParameter(structs.FunctionParameter* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_argType = create(data.argType, offset_to_index) if data.argType is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_FunctionParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_argType);
  __Pyx_XDECREF(__pyx_v_v_mode);
  __Pyx_XDECREF(__pyx_v_v_defexpr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1241
 * 
 * 
 * cdef create_AlterFunctionStmt(structs.AlterFunctionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterFunctionStmt(AlterFunctionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_func = 0;
  PyObject *__pyx_v_v_actions = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterFunctionStmt", 0);

  /* "pglast/ast.pyx":1242
 * 
 * cdef create_AlterFunctionStmt(structs.AlterFunctionStmt* data, offset_to_index):
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1243
 * cdef create_AlterFunctionStmt(structs.AlterFunctionStmt* data, offset_to_index):
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)
 *     return ast.AlterFunctionStmt(v_objtype, v_func, v_actions)
 */
  if ((__pyx_v_data->func != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->func, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_func = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1244
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterFunctionStmt(v_objtype, v_func, v_actions)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->actions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1244, __pyx_L1_error)
  __pyx_v_v_actions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1245
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)
 *     return ast.AlterFunctionStmt(v_objtype, v_func, v_actions)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterFunctionStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_objtype, __pyx_v_v_func, __pyx_v_v_actions};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __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;

  /* "pglast/ast.pyx":1241
 * 
 * 
 * cdef create_AlterFunctionStmt(structs.AlterFunctionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterFunctionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_func);
  __Pyx_XDECREF(__pyx_v_v_actions);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1248
 * 
 * 
 * cdef create_DoStmt(structs.DoStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     return ast.DoStmt(v_args)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DoStmt(DoStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DoStmt", 0);

  /* "pglast/ast.pyx":1249
 * 
 * cdef create_DoStmt(structs.DoStmt* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.DoStmt(v_args)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1249, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1250
 * cdef create_DoStmt(structs.DoStmt* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     return ast.DoStmt(v_args)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DoStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_args};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __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;

  /* "pglast/ast.pyx":1248
 * 
 * 
 * cdef create_DoStmt(structs.DoStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     return ast.DoStmt(v_args)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_DoStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1253
 * 
 * 
 * cdef create_InlineCodeBlock(structs.InlineCodeBlock* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_source_text = data.source_text.decode("utf-8") if data.source_text is not NULL else None
 *     cdef object v_langIsTrusted = bool(data.langIsTrusted)
 */

static PyObject *__pyx_f_6pglast_6parser_create_InlineCodeBlock(InlineCodeBlock *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_source_text = 0;
  PyObject *__pyx_v_v_langIsTrusted = 0;
  PyObject *__pyx_v_v_atomic = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InlineCodeBlock", 0);

  /* "pglast/ast.pyx":1254
 * 
 * cdef create_InlineCodeBlock(structs.InlineCodeBlock* data, offset_to_index):
 *     cdef object v_source_text = data.source_text.decode("utf-8") if data.source_text is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_langIsTrusted = bool(data.langIsTrusted)
 *     cdef object v_atomic = bool(data.atomic)
 */
  if ((__pyx_v_data->source_text != NULL)) {
    __pyx_t_2 = __pyx_v_data->source_text;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_source_text = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1255
 * cdef create_InlineCodeBlock(structs.InlineCodeBlock* data, offset_to_index):
 *     cdef object v_source_text = data.source_text.decode("utf-8") if data.source_text is not NULL else None
 *     cdef object v_langIsTrusted = bool(data.langIsTrusted)             # <<<<<<<<<<<<<<
 *     cdef object v_atomic = bool(data.atomic)
 *     return ast.InlineCodeBlock(v_source_text, v_langIsTrusted, v_atomic)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->langIsTrusted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_langIsTrusted = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1256
 *     cdef object v_source_text = data.source_text.decode("utf-8") if data.source_text is not NULL else None
 *     cdef object v_langIsTrusted = bool(data.langIsTrusted)
 *     cdef object v_atomic = bool(data.atomic)             # <<<<<<<<<<<<<<
 *     return ast.InlineCodeBlock(v_source_text, v_langIsTrusted, v_atomic)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->atomic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_atomic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1257
 *     cdef object v_langIsTrusted = bool(data.langIsTrusted)
 *     cdef object v_atomic = bool(data.atomic)
 *     return ast.InlineCodeBlock(v_source_text, v_langIsTrusted, v_atomic)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InlineCodeBlock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_source_text, __pyx_v_v_langIsTrusted, __pyx_v_v_atomic};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1253
 * 
 * 
 * cdef create_InlineCodeBlock(structs.InlineCodeBlock* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_source_text = data.source_text.decode("utf-8") if data.source_text is not NULL else None
 *     cdef object v_langIsTrusted = bool(data.langIsTrusted)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_InlineCodeBlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_source_text);
  __Pyx_XDECREF(__pyx_v_v_langIsTrusted);
  __Pyx_XDECREF(__pyx_v_v_atomic);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1260
 * 
 * 
 * cdef create_CallStmt(structs.CallStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_funccall = create(data.funccall, offset_to_index) if data.funccall is not NULL else None
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CallStmt(CallStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_funccall = 0;
  PyObject *__pyx_v_v_funcexpr = 0;
  PyObject *__pyx_v_v_outargs = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CallStmt", 0);

  /* "pglast/ast.pyx":1261
 * 
 * cdef create_CallStmt(structs.CallStmt* data, offset_to_index):
 *     cdef object v_funccall = create(data.funccall, offset_to_index) if data.funccall is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 *     cdef tuple v_outargs = _pg_list_to_tuple(data.outargs, offset_to_index)
 */
  if ((__pyx_v_data->funccall != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->funccall, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_funccall = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1262
 * cdef create_CallStmt(structs.CallStmt* data, offset_to_index):
 *     cdef object v_funccall = create(data.funccall, offset_to_index) if data.funccall is not NULL else None
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_outargs = _pg_list_to_tuple(data.outargs, offset_to_index)
 *     return ast.CallStmt(v_funccall, v_funcexpr, v_outargs)
 */
  if ((__pyx_v_data->funcexpr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->funcexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_funcexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1263
 *     cdef object v_funccall = create(data.funccall, offset_to_index) if data.funccall is not NULL else None
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 *     cdef tuple v_outargs = _pg_list_to_tuple(data.outargs, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CallStmt(v_funccall, v_funcexpr, v_outargs)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->outargs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1263, __pyx_L1_error)
  __pyx_v_v_outargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1264
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 *     cdef tuple v_outargs = _pg_list_to_tuple(data.outargs, offset_to_index)
 *     return ast.CallStmt(v_funccall, v_funcexpr, v_outargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CallStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_funccall, __pyx_v_v_funcexpr, __pyx_v_v_outargs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __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;

  /* "pglast/ast.pyx":1260
 * 
 * 
 * cdef create_CallStmt(structs.CallStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_funccall = create(data.funccall, offset_to_index) if data.funccall is not NULL else None
 *     cdef object v_funcexpr = create(data.funcexpr, offset_to_index) if data.funcexpr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CallStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_funccall);
  __Pyx_XDECREF(__pyx_v_v_funcexpr);
  __Pyx_XDECREF(__pyx_v_v_outargs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1267
 * 
 * 
 * cdef create_CallContext(structs.CallContext* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_atomic = bool(data.atomic)
 *     return ast.CallContext(v_atomic)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CallContext(CallContext *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_atomic = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CallContext", 0);

  /* "pglast/ast.pyx":1268
 * 
 * cdef create_CallContext(structs.CallContext* data, offset_to_index):
 *     cdef object v_atomic = bool(data.atomic)             # <<<<<<<<<<<<<<
 *     return ast.CallContext(v_atomic)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->atomic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_atomic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1269
 * cdef create_CallContext(structs.CallContext* data, offset_to_index):
 *     cdef object v_atomic = bool(data.atomic)
 *     return ast.CallContext(v_atomic)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CallContext); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_atomic};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1267
 * 
 * 
 * cdef create_CallContext(structs.CallContext* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_atomic = bool(data.atomic)
 *     return ast.CallContext(v_atomic)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CallContext", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_atomic);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1272
 * 
 * 
 * cdef create_RenameStmt(structs.RenameStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_renameType = getattr(enums, 'ObjectType')(data.renameType)
 *     cdef object v_relationType = getattr(enums, 'ObjectType')(data.relationType)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RenameStmt(RenameStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_renameType = 0;
  PyObject *__pyx_v_v_relationType = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_object = 0;
  PyObject *__pyx_v_v_subname = 0;
  PyObject *__pyx_v_v_newname = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RenameStmt", 0);

  /* "pglast/ast.pyx":1273
 * 
 * cdef create_RenameStmt(structs.RenameStmt* data, offset_to_index):
 *     cdef object v_renameType = getattr(enums, 'ObjectType')(data.renameType)             # <<<<<<<<<<<<<<
 *     cdef object v_relationType = getattr(enums, 'ObjectType')(data.relationType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->renameType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_renameType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1274
 * cdef create_RenameStmt(structs.RenameStmt* data, offset_to_index):
 *     cdef object v_renameType = getattr(enums, 'ObjectType')(data.renameType)
 *     cdef object v_relationType = getattr(enums, 'ObjectType')(data.relationType)             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->relationType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_relationType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1275
 *     cdef object v_renameType = getattr(enums, 'ObjectType')(data.renameType)
 *     cdef object v_relationType = getattr(enums, 'ObjectType')(data.relationType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1276
 *     cdef object v_relationType = getattr(enums, 'ObjectType')(data.relationType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_newname = data.newname.decode("utf-8") if data.newname is not NULL else None
 */
  if ((__pyx_v_data->object != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1277
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_newname = data.newname.decode("utf-8") if data.newname is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  if ((__pyx_v_data->subname != NULL)) {
    __pyx_t_6 = __pyx_v_data->subname;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_subname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1278
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_newname = data.newname.decode("utf-8") if data.newname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  if ((__pyx_v_data->newname != NULL)) {
    __pyx_t_7 = __pyx_v_data->newname;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_newname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1279
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_newname = data.newname.decode("utf-8") if data.newname is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.RenameStmt(v_renameType, v_relationType, v_relation, v_object, v_subname, v_newname, v_behavior, v_missing_ok)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1280
 *     cdef object v_newname = data.newname.decode("utf-8") if data.newname is not NULL else None
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.RenameStmt(v_renameType, v_relationType, v_relation, v_object, v_subname, v_newname, v_behavior, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1281
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.RenameStmt(v_renameType, v_relationType, v_relation, v_object, v_subname, v_newname, v_behavior, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RenameStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_v_v_renameType, __pyx_v_v_relationType, __pyx_v_v_relation, __pyx_v_v_object, __pyx_v_v_subname, __pyx_v_v_newname, __pyx_v_v_behavior, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 8+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __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;

  /* "pglast/ast.pyx":1272
 * 
 * 
 * cdef create_RenameStmt(structs.RenameStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_renameType = getattr(enums, 'ObjectType')(data.renameType)
 *     cdef object v_relationType = getattr(enums, 'ObjectType')(data.relationType)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RenameStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_renameType);
  __Pyx_XDECREF(__pyx_v_v_relationType);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_object);
  __Pyx_XDECREF(__pyx_v_v_subname);
  __Pyx_XDECREF(__pyx_v_v_newname);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1284
 * 
 * 
 * cdef create_AlterObjectDependsStmt(structs.AlterObjectDependsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterObjectDependsStmt(AlterObjectDependsStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objectType = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_object = 0;
  PyObject *__pyx_v_v_extname = 0;
  PyObject *__pyx_v_v_remove = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterObjectDependsStmt", 0);

  /* "pglast/ast.pyx":1285
 * 
 * cdef create_AlterObjectDependsStmt(structs.AlterObjectDependsStmt* data, offset_to_index):
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objectType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objectType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1286
 * cdef create_AlterObjectDependsStmt(structs.AlterObjectDependsStmt* data, offset_to_index):
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_extname = create(data.extname, offset_to_index) if data.extname is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1287
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_extname = create(data.extname, offset_to_index) if data.extname is not NULL else None
 *     cdef object v_remove = bool(data.remove)
 */
  if ((__pyx_v_data->object != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1288
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_extname = create(data.extname, offset_to_index) if data.extname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_remove = bool(data.remove)
 *     return ast.AlterObjectDependsStmt(v_objectType, v_relation, v_object, v_extname, v_remove)
 */
  if ((__pyx_v_data->extname != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->extname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_extname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1289
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_extname = create(data.extname, offset_to_index) if data.extname is not NULL else None
 *     cdef object v_remove = bool(data.remove)             # <<<<<<<<<<<<<<
 *     return ast.AlterObjectDependsStmt(v_objectType, v_relation, v_object, v_extname, v_remove)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_remove = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1290
 *     cdef object v_extname = create(data.extname, offset_to_index) if data.extname is not NULL else None
 *     cdef object v_remove = bool(data.remove)
 *     return ast.AlterObjectDependsStmt(v_objectType, v_relation, v_object, v_extname, v_remove)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterObjectDependsStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_objectType, __pyx_v_v_relation, __pyx_v_v_object, __pyx_v_v_extname, __pyx_v_v_remove};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __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;

  /* "pglast/ast.pyx":1284
 * 
 * 
 * cdef create_AlterObjectDependsStmt(structs.AlterObjectDependsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterObjectDependsStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objectType);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_object);
  __Pyx_XDECREF(__pyx_v_v_extname);
  __Pyx_XDECREF(__pyx_v_v_remove);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1293
 * 
 * 
 * cdef create_AlterObjectSchemaStmt(structs.AlterObjectSchemaStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterObjectSchemaStmt(AlterObjectSchemaStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objectType = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_object = 0;
  PyObject *__pyx_v_v_newschema = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterObjectSchemaStmt", 0);

  /* "pglast/ast.pyx":1294
 * 
 * cdef create_AlterObjectSchemaStmt(structs.AlterObjectSchemaStmt* data, offset_to_index):
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objectType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objectType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1295
 * cdef create_AlterObjectSchemaStmt(structs.AlterObjectSchemaStmt* data, offset_to_index):
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_newschema = data.newschema.decode("utf-8") if data.newschema is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1296
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_newschema = data.newschema.decode("utf-8") if data.newschema is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  if ((__pyx_v_data->object != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1297
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_newschema = data.newschema.decode("utf-8") if data.newschema is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterObjectSchemaStmt(v_objectType, v_relation, v_object, v_newschema, v_missing_ok)
 */
  if ((__pyx_v_data->newschema != NULL)) {
    __pyx_t_6 = __pyx_v_data->newschema;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_newschema = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1298
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_newschema = data.newschema.decode("utf-8") if data.newschema is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.AlterObjectSchemaStmt(v_objectType, v_relation, v_object, v_newschema, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1299
 *     cdef object v_newschema = data.newschema.decode("utf-8") if data.newschema is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterObjectSchemaStmt(v_objectType, v_relation, v_object, v_newschema, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterObjectSchemaStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_objectType, __pyx_v_v_relation, __pyx_v_v_object, __pyx_v_v_newschema, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __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;

  /* "pglast/ast.pyx":1293
 * 
 * 
 * cdef create_AlterObjectSchemaStmt(structs.AlterObjectSchemaStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterObjectSchemaStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objectType);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_object);
  __Pyx_XDECREF(__pyx_v_v_newschema);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1302
 * 
 * 
 * cdef create_AlterOwnerStmt(structs.AlterOwnerStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterOwnerStmt(AlterOwnerStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_objectType = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_object = 0;
  PyObject *__pyx_v_v_newowner = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterOwnerStmt", 0);

  /* "pglast/ast.pyx":1303
 * 
 * cdef create_AlterOwnerStmt(structs.AlterOwnerStmt* data, offset_to_index):
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objectType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objectType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1304
 * cdef create_AlterOwnerStmt(structs.AlterOwnerStmt* data, offset_to_index):
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1305
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None
 *     return ast.AlterOwnerStmt(v_objectType, v_relation, v_object, v_newowner)
 */
  if ((__pyx_v_data->object != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1306
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterOwnerStmt(v_objectType, v_relation, v_object, v_newowner)
 * 
 */
  if ((__pyx_v_data->newowner != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->newowner, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_newowner = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1307
 *     cdef object v_object = create(data.object, offset_to_index) if data.object is not NULL else None
 *     cdef object v_newowner = create(data.newowner, offset_to_index) if data.newowner is not NULL else None
 *     return ast.AlterOwnerStmt(v_objectType, v_relation, v_object, v_newowner)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterOwnerStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_objectType, __pyx_v_v_relation, __pyx_v_v_object, __pyx_v_v_newowner};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __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;

  /* "pglast/ast.pyx":1302
 * 
 * 
 * cdef create_AlterOwnerStmt(structs.AlterOwnerStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_objectType = getattr(enums, 'ObjectType')(data.objectType)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterOwnerStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_objectType);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_object);
  __Pyx_XDECREF(__pyx_v_v_newowner);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1310
 * 
 * 
 * cdef create_AlterOperatorStmt(structs.AlterOperatorStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_opername = create(data.opername, offset_to_index) if data.opername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterOperatorStmt(AlterOperatorStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_opername = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterOperatorStmt", 0);

  /* "pglast/ast.pyx":1311
 * 
 * cdef create_AlterOperatorStmt(structs.AlterOperatorStmt* data, offset_to_index):
 *     cdef object v_opername = create(data.opername, offset_to_index) if data.opername is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterOperatorStmt(v_opername, v_options)
 */
  if ((__pyx_v_data->opername != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->opername, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_opername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1312
 * cdef create_AlterOperatorStmt(structs.AlterOperatorStmt* data, offset_to_index):
 *     cdef object v_opername = create(data.opername, offset_to_index) if data.opername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterOperatorStmt(v_opername, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1312, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1313
 *     cdef object v_opername = create(data.opername, offset_to_index) if data.opername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterOperatorStmt(v_opername, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterOperatorStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_opername, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __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;

  /* "pglast/ast.pyx":1310
 * 
 * 
 * cdef create_AlterOperatorStmt(structs.AlterOperatorStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_opername = create(data.opername, offset_to_index) if data.opername is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlterOperatorStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_opername);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1316
 * 
 * 
 * cdef create_AlterTypeStmt(structs.AlterTypeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterTypeStmt(AlterTypeStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTypeStmt", 0);

  /* "pglast/ast.pyx":1317
 * 
 * cdef create_AlterTypeStmt(structs.AlterTypeStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterTypeStmt(v_typeName, v_options)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1317, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1318
 * cdef create_AlterTypeStmt(structs.AlterTypeStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterTypeStmt(v_typeName, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1318, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1319
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterTypeStmt(v_typeName, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterTypeStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_typeName, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __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;

  /* "pglast/ast.pyx":1316
 * 
 * 
 * cdef create_AlterTypeStmt(structs.AlterTypeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlterTypeStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1322
 * 
 * 
 * cdef create_RuleStmt(structs.RuleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_rulename = data.rulename.decode("utf-8") if data.rulename is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_RuleStmt(RuleStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_rulename = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_event = 0;
  PyObject *__pyx_v_v_instead = 0;
  PyObject *__pyx_v_v_actions = 0;
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RuleStmt", 0);

  /* "pglast/ast.pyx":1323
 * 
 * cdef create_RuleStmt(structs.RuleStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rulename = data.rulename.decode("utf-8") if data.rulename is not NULL else None
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1324
 * cdef create_RuleStmt(structs.RuleStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_rulename = data.rulename.decode("utf-8") if data.rulename is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_event = getattr(enums, 'CmdType')(data.event)
 */
  if ((__pyx_v_data->rulename != NULL)) {
    __pyx_t_3 = __pyx_v_data->rulename;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rulename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1325
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_rulename = data.rulename.decode("utf-8") if data.rulename is not NULL else None
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_event = getattr(enums, 'CmdType')(data.event)
 *     cdef object v_instead = bool(data.instead)
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1326
 *     cdef object v_rulename = data.rulename.decode("utf-8") if data.rulename is not NULL else None
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_event = getattr(enums, 'CmdType')(data.event)             # <<<<<<<<<<<<<<
 *     cdef object v_instead = bool(data.instead)
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CmdType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CmdType(__pyx_v_data->event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_event = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1327
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_event = getattr(enums, 'CmdType')(data.event)
 *     cdef object v_instead = bool(data.instead)             # <<<<<<<<<<<<<<
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)
 *     cdef object v_replace = bool(data.replace)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->instead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_instead = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1328
 *     cdef object v_event = getattr(enums, 'CmdType')(data.event)
 *     cdef object v_instead = bool(data.instead)
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     return ast.RuleStmt(v_relation, v_rulename, v_whereClause, v_event, v_instead, v_actions, v_replace)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->actions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1328, __pyx_L1_error)
  __pyx_v_v_actions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1329
 *     cdef object v_instead = bool(data.instead)
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     return ast.RuleStmt(v_relation, v_rulename, v_whereClause, v_event, v_instead, v_actions, v_replace)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1330
 *     cdef tuple v_actions = _pg_list_to_tuple(data.actions, offset_to_index)
 *     cdef object v_replace = bool(data.replace)
 *     return ast.RuleStmt(v_relation, v_rulename, v_whereClause, v_event, v_instead, v_actions, v_replace)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_RuleStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __pyx_v_v_relation, __pyx_v_v_rulename, __pyx_v_v_whereClause, __pyx_v_v_event, __pyx_v_v_instead, __pyx_v_v_actions, __pyx_v_v_replace};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 7+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __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;

  /* "pglast/ast.pyx":1322
 * 
 * 
 * cdef create_RuleStmt(structs.RuleStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_rulename = data.rulename.decode("utf-8") if data.rulename is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_RuleStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_rulename);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_event);
  __Pyx_XDECREF(__pyx_v_v_instead);
  __Pyx_XDECREF(__pyx_v_v_actions);
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1333
 * 
 * 
 * cdef create_NotifyStmt(structs.NotifyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     cdef object v_payload = data.payload.decode("utf-8") if data.payload is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_NotifyStmt(NotifyStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_conditionname = 0;
  PyObject *__pyx_v_v_payload = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_NotifyStmt", 0);

  /* "pglast/ast.pyx":1334
 * 
 * cdef create_NotifyStmt(structs.NotifyStmt* data, offset_to_index):
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_payload = data.payload.decode("utf-8") if data.payload is not NULL else None
 *     return ast.NotifyStmt(v_conditionname, v_payload)
 */
  if ((__pyx_v_data->conditionname != NULL)) {
    __pyx_t_2 = __pyx_v_data->conditionname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_conditionname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1335
 * cdef create_NotifyStmt(structs.NotifyStmt* data, offset_to_index):
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     cdef object v_payload = data.payload.decode("utf-8") if data.payload is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.NotifyStmt(v_conditionname, v_payload)
 * 
 */
  if ((__pyx_v_data->payload != NULL)) {
    __pyx_t_4 = __pyx_v_data->payload;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_payload = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1336
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     cdef object v_payload = data.payload.decode("utf-8") if data.payload is not NULL else None
 *     return ast.NotifyStmt(v_conditionname, v_payload)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_NotifyStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_conditionname, __pyx_v_v_payload};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1333
 * 
 * 
 * cdef create_NotifyStmt(structs.NotifyStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     cdef object v_payload = data.payload.decode("utf-8") if data.payload is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_NotifyStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_conditionname);
  __Pyx_XDECREF(__pyx_v_v_payload);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1339
 * 
 * 
 * cdef create_ListenStmt(structs.ListenStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     return ast.ListenStmt(v_conditionname)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ListenStmt(ListenStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_conditionname = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ListenStmt", 0);

  /* "pglast/ast.pyx":1340
 * 
 * cdef create_ListenStmt(structs.ListenStmt* data, offset_to_index):
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.ListenStmt(v_conditionname)
 * 
 */
  if ((__pyx_v_data->conditionname != NULL)) {
    __pyx_t_2 = __pyx_v_data->conditionname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_conditionname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1341
 * cdef create_ListenStmt(structs.ListenStmt* data, offset_to_index):
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     return ast.ListenStmt(v_conditionname)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ListenStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_conditionname};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1339
 * 
 * 
 * cdef create_ListenStmt(structs.ListenStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     return ast.ListenStmt(v_conditionname)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ListenStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_conditionname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1344
 * 
 * 
 * cdef create_UnlistenStmt(structs.UnlistenStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     return ast.UnlistenStmt(v_conditionname)
 */

static PyObject *__pyx_f_6pglast_6parser_create_UnlistenStmt(UnlistenStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_conditionname = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_UnlistenStmt", 0);

  /* "pglast/ast.pyx":1345
 * 
 * cdef create_UnlistenStmt(structs.UnlistenStmt* data, offset_to_index):
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.UnlistenStmt(v_conditionname)
 * 
 */
  if ((__pyx_v_data->conditionname != NULL)) {
    __pyx_t_2 = __pyx_v_data->conditionname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_conditionname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1346
 * cdef create_UnlistenStmt(structs.UnlistenStmt* data, offset_to_index):
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     return ast.UnlistenStmt(v_conditionname)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_UnlistenStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_conditionname};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1344
 * 
 * 
 * cdef create_UnlistenStmt(structs.UnlistenStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conditionname = data.conditionname.decode("utf-8") if data.conditionname is not NULL else None
 *     return ast.UnlistenStmt(v_conditionname)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_UnlistenStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_conditionname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1349
 * 
 * 
 * cdef create_TransactionStmt(structs.TransactionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'TransactionStmtKind')(data.kind)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_TransactionStmt(TransactionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_savepoint_name = 0;
  PyObject *__pyx_v_v_gid = 0;
  PyObject *__pyx_v_v_chain = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TransactionStmt", 0);

  /* "pglast/ast.pyx":1350
 * 
 * cdef create_TransactionStmt(structs.TransactionStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'TransactionStmtKind')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_savepoint_name = data.savepoint_name.decode("utf-8") if data.savepoint_name is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_TransactionStmtKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_TransactionStmtKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1351
 * cdef create_TransactionStmt(structs.TransactionStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'TransactionStmtKind')(data.kind)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_savepoint_name = data.savepoint_name.decode("utf-8") if data.savepoint_name is not NULL else None
 *     cdef object v_gid = data.gid.decode("utf-8") if data.gid is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1351, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1352
 *     cdef object v_kind = getattr(enums, 'TransactionStmtKind')(data.kind)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_savepoint_name = data.savepoint_name.decode("utf-8") if data.savepoint_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_gid = data.gid.decode("utf-8") if data.gid is not NULL else None
 *     cdef object v_chain = bool(data.chain)
 */
  if ((__pyx_v_data->savepoint_name != NULL)) {
    __pyx_t_6 = __pyx_v_data->savepoint_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_savepoint_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1353
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_savepoint_name = data.savepoint_name.decode("utf-8") if data.savepoint_name is not NULL else None
 *     cdef object v_gid = data.gid.decode("utf-8") if data.gid is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_chain = bool(data.chain)
 *     return ast.TransactionStmt(v_kind, v_options, v_savepoint_name, v_gid, v_chain)
 */
  if ((__pyx_v_data->gid != NULL)) {
    __pyx_t_7 = __pyx_v_data->gid;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_gid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1354
 *     cdef object v_savepoint_name = data.savepoint_name.decode("utf-8") if data.savepoint_name is not NULL else None
 *     cdef object v_gid = data.gid.decode("utf-8") if data.gid is not NULL else None
 *     cdef object v_chain = bool(data.chain)             # <<<<<<<<<<<<<<
 *     return ast.TransactionStmt(v_kind, v_options, v_savepoint_name, v_gid, v_chain)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->chain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_chain = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1355
 *     cdef object v_gid = data.gid.decode("utf-8") if data.gid is not NULL else None
 *     cdef object v_chain = bool(data.chain)
 *     return ast.TransactionStmt(v_kind, v_options, v_savepoint_name, v_gid, v_chain)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TransactionStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_options, __pyx_v_v_savepoint_name, __pyx_v_v_gid, __pyx_v_v_chain};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __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;

  /* "pglast/ast.pyx":1349
 * 
 * 
 * cdef create_TransactionStmt(structs.TransactionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'TransactionStmtKind')(data.kind)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_TransactionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_savepoint_name);
  __Pyx_XDECREF(__pyx_v_v_gid);
  __Pyx_XDECREF(__pyx_v_v_chain);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1358
 * 
 * 
 * cdef create_CompositeTypeStmt(structs.CompositeTypeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typevar = create(data.typevar, offset_to_index) if data.typevar is not NULL else None
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CompositeTypeStmt(CompositeTypeStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typevar = 0;
  PyObject *__pyx_v_v_coldeflist = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CompositeTypeStmt", 0);

  /* "pglast/ast.pyx":1359
 * 
 * cdef create_CompositeTypeStmt(structs.CompositeTypeStmt* data, offset_to_index):
 *     cdef object v_typevar = create(data.typevar, offset_to_index) if data.typevar is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)
 *     return ast.CompositeTypeStmt(v_typevar, v_coldeflist)
 */
  if ((__pyx_v_data->typevar != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typevar, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_typevar = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1360
 * cdef create_CompositeTypeStmt(structs.CompositeTypeStmt* data, offset_to_index):
 *     cdef object v_typevar = create(data.typevar, offset_to_index) if data.typevar is not NULL else None
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CompositeTypeStmt(v_typevar, v_coldeflist)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->coldeflist, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1360, __pyx_L1_error)
  __pyx_v_v_coldeflist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1361
 *     cdef object v_typevar = create(data.typevar, offset_to_index) if data.typevar is not NULL else None
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)
 *     return ast.CompositeTypeStmt(v_typevar, v_coldeflist)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CompositeTypeStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_typevar, __pyx_v_v_coldeflist};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __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;

  /* "pglast/ast.pyx":1358
 * 
 * 
 * cdef create_CompositeTypeStmt(structs.CompositeTypeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typevar = create(data.typevar, offset_to_index) if data.typevar is not NULL else None
 *     cdef tuple v_coldeflist = _pg_list_to_tuple(data.coldeflist, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CompositeTypeStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typevar);
  __Pyx_XDECREF(__pyx_v_v_coldeflist);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1364
 * 
 * 
 * cdef create_CreateEnumStmt(structs.CreateEnumStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_vals = _pg_list_to_tuple(data.vals, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateEnumStmt(CreateEnumStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_vals = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateEnumStmt", 0);

  /* "pglast/ast.pyx":1365
 * 
 * cdef create_CreateEnumStmt(structs.CreateEnumStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_vals = _pg_list_to_tuple(data.vals, offset_to_index)
 *     return ast.CreateEnumStmt(v_typeName, v_vals)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1365, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1366
 * cdef create_CreateEnumStmt(structs.CreateEnumStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_vals = _pg_list_to_tuple(data.vals, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateEnumStmt(v_typeName, v_vals)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->vals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1366, __pyx_L1_error)
  __pyx_v_v_vals = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1367
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_vals = _pg_list_to_tuple(data.vals, offset_to_index)
 *     return ast.CreateEnumStmt(v_typeName, v_vals)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CreateEnumStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_typeName, __pyx_v_v_vals};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __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;

  /* "pglast/ast.pyx":1364
 * 
 * 
 * cdef create_CreateEnumStmt(structs.CreateEnumStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_vals = _pg_list_to_tuple(data.vals, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CreateEnumStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_vals);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1370
 * 
 * 
 * cdef create_CreateRangeStmt(structs.CreateRangeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateRangeStmt(CreateRangeStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_params = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateRangeStmt", 0);

  /* "pglast/ast.pyx":1371
 * 
 * cdef create_CreateRangeStmt(structs.CreateRangeStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.CreateRangeStmt(v_typeName, v_params)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1371, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1372
 * cdef create_CreateRangeStmt(structs.CreateRangeStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateRangeStmt(v_typeName, v_params)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->params, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1372, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1373
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.CreateRangeStmt(v_typeName, v_params)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CreateRangeStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_typeName, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __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;

  /* "pglast/ast.pyx":1370
 * 
 * 
 * cdef create_CreateRangeStmt(structs.CreateRangeStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CreateRangeStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_params);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1376
 * 
 * 
 * cdef create_AlterEnumStmt(structs.AlterEnumStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef object v_oldVal = data.oldVal.decode("utf-8") if data.oldVal is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterEnumStmt(AlterEnumStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_oldVal = 0;
  PyObject *__pyx_v_v_newVal = 0;
  PyObject *__pyx_v_v_newValNeighbor = 0;
  PyObject *__pyx_v_v_newValIsAfter = 0;
  PyObject *__pyx_v_v_skipIfNewValExists = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  char const *__pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterEnumStmt", 0);

  /* "pglast/ast.pyx":1377
 * 
 * cdef create_AlterEnumStmt(structs.AlterEnumStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_oldVal = data.oldVal.decode("utf-8") if data.oldVal is not NULL else None
 *     cdef object v_newVal = data.newVal.decode("utf-8") if data.newVal is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1377, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1378
 * cdef create_AlterEnumStmt(structs.AlterEnumStmt* data, offset_to_index):
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef object v_oldVal = data.oldVal.decode("utf-8") if data.oldVal is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_newVal = data.newVal.decode("utf-8") if data.newVal is not NULL else None
 *     cdef object v_newValNeighbor = data.newValNeighbor.decode("utf-8") if data.newValNeighbor is not NULL else None
 */
  if ((__pyx_v_data->oldVal != NULL)) {
    __pyx_t_2 = __pyx_v_data->oldVal;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_oldVal = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1379
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef object v_oldVal = data.oldVal.decode("utf-8") if data.oldVal is not NULL else None
 *     cdef object v_newVal = data.newVal.decode("utf-8") if data.newVal is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_newValNeighbor = data.newValNeighbor.decode("utf-8") if data.newValNeighbor is not NULL else None
 *     cdef object v_newValIsAfter = bool(data.newValIsAfter)
 */
  if ((__pyx_v_data->newVal != NULL)) {
    __pyx_t_4 = __pyx_v_data->newVal;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_newVal = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1380
 *     cdef object v_oldVal = data.oldVal.decode("utf-8") if data.oldVal is not NULL else None
 *     cdef object v_newVal = data.newVal.decode("utf-8") if data.newVal is not NULL else None
 *     cdef object v_newValNeighbor = data.newValNeighbor.decode("utf-8") if data.newValNeighbor is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_newValIsAfter = bool(data.newValIsAfter)
 *     cdef object v_skipIfNewValExists = bool(data.skipIfNewValExists)
 */
  if ((__pyx_v_data->newValNeighbor != NULL)) {
    __pyx_t_5 = __pyx_v_data->newValNeighbor;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_newValNeighbor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1381
 *     cdef object v_newVal = data.newVal.decode("utf-8") if data.newVal is not NULL else None
 *     cdef object v_newValNeighbor = data.newValNeighbor.decode("utf-8") if data.newValNeighbor is not NULL else None
 *     cdef object v_newValIsAfter = bool(data.newValIsAfter)             # <<<<<<<<<<<<<<
 *     cdef object v_skipIfNewValExists = bool(data.skipIfNewValExists)
 *     return ast.AlterEnumStmt(v_typeName, v_oldVal, v_newVal, v_newValNeighbor, v_newValIsAfter, v_skipIfNewValExists)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->newValIsAfter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_newValIsAfter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1382
 *     cdef object v_newValNeighbor = data.newValNeighbor.decode("utf-8") if data.newValNeighbor is not NULL else None
 *     cdef object v_newValIsAfter = bool(data.newValIsAfter)
 *     cdef object v_skipIfNewValExists = bool(data.skipIfNewValExists)             # <<<<<<<<<<<<<<
 *     return ast.AlterEnumStmt(v_typeName, v_oldVal, v_newVal, v_newValNeighbor, v_newValIsAfter, v_skipIfNewValExists)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->skipIfNewValExists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skipIfNewValExists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1383
 *     cdef object v_newValIsAfter = bool(data.newValIsAfter)
 *     cdef object v_skipIfNewValExists = bool(data.skipIfNewValExists)
 *     return ast.AlterEnumStmt(v_typeName, v_oldVal, v_newVal, v_newValNeighbor, v_newValIsAfter, v_skipIfNewValExists)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterEnumStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_8 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_typeName, __pyx_v_v_oldVal, __pyx_v_v_newVal, __pyx_v_v_newValNeighbor, __pyx_v_v_newValIsAfter, __pyx_v_v_skipIfNewValExists};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 6+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1376
 * 
 * 
 * cdef create_AlterEnumStmt(structs.AlterEnumStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_typeName = _pg_list_to_tuple(data.typeName, offset_to_index)
 *     cdef object v_oldVal = data.oldVal.decode("utf-8") if data.oldVal is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_AlterEnumStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_oldVal);
  __Pyx_XDECREF(__pyx_v_v_newVal);
  __Pyx_XDECREF(__pyx_v_v_newValNeighbor);
  __Pyx_XDECREF(__pyx_v_v_newValIsAfter);
  __Pyx_XDECREF(__pyx_v_v_skipIfNewValExists);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1386
 * 
 * 
 * cdef create_ViewStmt(structs.ViewStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_view = create(data.view, offset_to_index) if data.view is not NULL else None
 *     cdef tuple v_aliases = _pg_list_to_tuple(data.aliases, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ViewStmt(ViewStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_view = 0;
  PyObject *__pyx_v_v_aliases = 0;
  PyObject *__pyx_v_v_query = 0;
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_withCheckOption = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ViewStmt", 0);

  /* "pglast/ast.pyx":1387
 * 
 * cdef create_ViewStmt(structs.ViewStmt* data, offset_to_index):
 *     cdef object v_view = create(data.view, offset_to_index) if data.view is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_aliases = _pg_list_to_tuple(data.aliases, offset_to_index)
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 */
  if ((__pyx_v_data->view != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->view, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_view = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1388
 * cdef create_ViewStmt(structs.ViewStmt* data, offset_to_index):
 *     cdef object v_view = create(data.view, offset_to_index) if data.view is not NULL else None
 *     cdef tuple v_aliases = _pg_list_to_tuple(data.aliases, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_replace = bool(data.replace)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->aliases, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1388, __pyx_L1_error)
  __pyx_v_v_aliases = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1389
 *     cdef object v_view = create(data.view, offset_to_index) if data.view is not NULL else None
 *     cdef tuple v_aliases = _pg_list_to_tuple(data.aliases, offset_to_index)
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->query != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_query = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1390
 *     cdef tuple v_aliases = _pg_list_to_tuple(data.aliases, offset_to_index)
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_withCheckOption = getattr(enums, 'ViewCheckOption')(data.withCheckOption)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1391
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_replace = bool(data.replace)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_withCheckOption = getattr(enums, 'ViewCheckOption')(data.withCheckOption)
 *     return ast.ViewStmt(v_view, v_aliases, v_query, v_replace, v_options, v_withCheckOption)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1391, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1392
 *     cdef object v_replace = bool(data.replace)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_withCheckOption = getattr(enums, 'ViewCheckOption')(data.withCheckOption)             # <<<<<<<<<<<<<<
 *     return ast.ViewStmt(v_view, v_aliases, v_query, v_replace, v_options, v_withCheckOption)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ViewCheckOption); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ViewCheckOption(__pyx_v_data->withCheckOption); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_withCheckOption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1393
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_withCheckOption = getattr(enums, 'ViewCheckOption')(data.withCheckOption)
 *     return ast.ViewStmt(v_view, v_aliases, v_query, v_replace, v_options, v_withCheckOption)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ViewStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_view, __pyx_v_v_aliases, __pyx_v_v_query, __pyx_v_v_replace, __pyx_v_v_options, __pyx_v_v_withCheckOption};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __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;

  /* "pglast/ast.pyx":1386
 * 
 * 
 * cdef create_ViewStmt(structs.ViewStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_view = create(data.view, offset_to_index) if data.view is not NULL else None
 *     cdef tuple v_aliases = _pg_list_to_tuple(data.aliases, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_ViewStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_view);
  __Pyx_XDECREF(__pyx_v_v_aliases);
  __Pyx_XDECREF(__pyx_v_v_query);
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_withCheckOption);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1396
 * 
 * 
 * cdef create_LoadStmt(structs.LoadStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None
 *     return ast.LoadStmt(v_filename)
 */

static PyObject *__pyx_f_6pglast_6parser_create_LoadStmt(LoadStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_filename = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_LoadStmt", 0);

  /* "pglast/ast.pyx":1397
 * 
 * cdef create_LoadStmt(structs.LoadStmt* data, offset_to_index):
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.LoadStmt(v_filename)
 * 
 */
  if ((__pyx_v_data->filename != NULL)) {
    __pyx_t_2 = __pyx_v_data->filename;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_filename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1398
 * cdef create_LoadStmt(structs.LoadStmt* data, offset_to_index):
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None
 *     return ast.LoadStmt(v_filename)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LoadStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_filename};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1396
 * 
 * 
 * cdef create_LoadStmt(structs.LoadStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_filename = data.filename.decode("utf-8") if data.filename is not NULL else None
 *     return ast.LoadStmt(v_filename)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_LoadStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_filename);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1401
 * 
 * 
 * cdef create_CreatedbStmt(structs.CreatedbStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreatedbStmt(CreatedbStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_dbname = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatedbStmt", 0);

  /* "pglast/ast.pyx":1402
 * 
 * cdef create_CreatedbStmt(structs.CreatedbStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreatedbStmt(v_dbname, v_options)
 */
  if ((__pyx_v_data->dbname != NULL)) {
    __pyx_t_2 = __pyx_v_data->dbname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_dbname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1403
 * cdef create_CreatedbStmt(structs.CreatedbStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreatedbStmt(v_dbname, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1403, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1404
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreatedbStmt(v_dbname, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreatedbStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_dbname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1401
 * 
 * 
 * cdef create_CreatedbStmt(structs.CreatedbStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreatedbStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_dbname);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1407
 * 
 * 
 * cdef create_AlterDatabaseStmt(structs.AlterDatabaseStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterDatabaseStmt(AlterDatabaseStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_dbname = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDatabaseStmt", 0);

  /* "pglast/ast.pyx":1408
 * 
 * cdef create_AlterDatabaseStmt(structs.AlterDatabaseStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterDatabaseStmt(v_dbname, v_options)
 */
  if ((__pyx_v_data->dbname != NULL)) {
    __pyx_t_2 = __pyx_v_data->dbname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_dbname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1409
 * cdef create_AlterDatabaseStmt(structs.AlterDatabaseStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterDatabaseStmt(v_dbname, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1409, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1410
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterDatabaseStmt(v_dbname, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterDatabaseStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_dbname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1407
 * 
 * 
 * cdef create_AlterDatabaseStmt(structs.AlterDatabaseStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterDatabaseStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_dbname);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1413
 * 
 * 
 * cdef create_AlterDatabaseRefreshCollStmt(structs.AlterDatabaseRefreshCollStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     return ast.AlterDatabaseRefreshCollStmt(v_dbname)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterDatabaseRefreshCollStmt(AlterDatabaseRefreshCollStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_dbname = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDatabaseRefreshCollStmt", 0);

  /* "pglast/ast.pyx":1414
 * 
 * cdef create_AlterDatabaseRefreshCollStmt(structs.AlterDatabaseRefreshCollStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterDatabaseRefreshCollStmt(v_dbname)
 * 
 */
  if ((__pyx_v_data->dbname != NULL)) {
    __pyx_t_2 = __pyx_v_data->dbname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_dbname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1415
 * cdef create_AlterDatabaseRefreshCollStmt(structs.AlterDatabaseRefreshCollStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     return ast.AlterDatabaseRefreshCollStmt(v_dbname)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterDatabaseRefreshCollStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_dbname};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1413
 * 
 * 
 * cdef create_AlterDatabaseRefreshCollStmt(structs.AlterDatabaseRefreshCollStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     return ast.AlterDatabaseRefreshCollStmt(v_dbname)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterDatabaseRefreshCollStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_dbname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1418
 * 
 * 
 * cdef create_AlterDatabaseSetStmt(structs.AlterDatabaseSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterDatabaseSetStmt(AlterDatabaseSetStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_dbname = 0;
  PyObject *__pyx_v_v_setstmt = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDatabaseSetStmt", 0);

  /* "pglast/ast.pyx":1419
 * 
 * cdef create_AlterDatabaseSetStmt(structs.AlterDatabaseSetStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 *     return ast.AlterDatabaseSetStmt(v_dbname, v_setstmt)
 */
  if ((__pyx_v_data->dbname != NULL)) {
    __pyx_t_2 = __pyx_v_data->dbname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_dbname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1420
 * cdef create_AlterDatabaseSetStmt(structs.AlterDatabaseSetStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterDatabaseSetStmt(v_dbname, v_setstmt)
 * 
 */
  if ((__pyx_v_data->setstmt != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setstmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_setstmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1421
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 *     return ast.AlterDatabaseSetStmt(v_dbname, v_setstmt)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterDatabaseSetStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_dbname, __pyx_v_v_setstmt};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1418
 * 
 * 
 * cdef create_AlterDatabaseSetStmt(structs.AlterDatabaseSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterDatabaseSetStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_dbname);
  __Pyx_XDECREF(__pyx_v_v_setstmt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1424
 * 
 * 
 * cdef create_DropdbStmt(structs.DropdbStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DropdbStmt(DropdbStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_dbname = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropdbStmt", 0);

  /* "pglast/ast.pyx":1425
 * 
 * cdef create_DropdbStmt(structs.DropdbStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->dbname != NULL)) {
    __pyx_t_2 = __pyx_v_data->dbname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_dbname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1426
 * cdef create_DropdbStmt(structs.DropdbStmt* data, offset_to_index):
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.DropdbStmt(v_dbname, v_missing_ok, v_options)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1427
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.DropdbStmt(v_dbname, v_missing_ok, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1427, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1428
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.DropdbStmt(v_dbname, v_missing_ok, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DropdbStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_dbname, __pyx_v_v_missing_ok, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1424
 * 
 * 
 * cdef create_DropdbStmt(structs.DropdbStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_dbname = data.dbname.decode("utf-8") if data.dbname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_DropdbStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_dbname);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1431
 * 
 * 
 * cdef create_AlterSystemStmt(structs.AlterSystemStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 *     return ast.AlterSystemStmt(v_setstmt)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterSystemStmt(AlterSystemStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_setstmt = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterSystemStmt", 0);

  /* "pglast/ast.pyx":1432
 * 
 * cdef create_AlterSystemStmt(structs.AlterSystemStmt* data, offset_to_index):
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.AlterSystemStmt(v_setstmt)
 * 
 */
  if ((__pyx_v_data->setstmt != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setstmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_setstmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1433
 * cdef create_AlterSystemStmt(structs.AlterSystemStmt* data, offset_to_index):
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 *     return ast.AlterSystemStmt(v_setstmt)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterSystemStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_setstmt};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __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;

  /* "pglast/ast.pyx":1431
 * 
 * 
 * cdef create_AlterSystemStmt(structs.AlterSystemStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_setstmt = create(data.setstmt, offset_to_index) if data.setstmt is not NULL else None
 *     return ast.AlterSystemStmt(v_setstmt)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlterSystemStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_setstmt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1436
 * 
 * 
 * cdef create_ClusterStmt(structs.ClusterStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_ClusterStmt(ClusterStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_indexname = 0;
  PyObject *__pyx_v_v_params = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ClusterStmt", 0);

  /* "pglast/ast.pyx":1437
 * 
 * cdef create_ClusterStmt(structs.ClusterStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1438
 * cdef create_ClusterStmt(structs.ClusterStmt* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.ClusterStmt(v_relation, v_indexname, v_params)
 */
  if ((__pyx_v_data->indexname != NULL)) {
    __pyx_t_3 = __pyx_v_data->indexname;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_indexname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1439
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.ClusterStmt(v_relation, v_indexname, v_params)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->params, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1439, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1440
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.ClusterStmt(v_relation, v_indexname, v_params)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ClusterStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_indexname, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1436
 * 
 * 
 * cdef create_ClusterStmt(structs.ClusterStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_indexname = data.indexname.decode("utf-8") if data.indexname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ClusterStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_indexname);
  __Pyx_XDECREF(__pyx_v_v_params);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1443
 * 
 * 
 * cdef create_VacuumStmt(structs.VacuumStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_rels = _pg_list_to_tuple(data.rels, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_VacuumStmt(VacuumStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_rels = 0;
  PyObject *__pyx_v_v_is_vacuumcmd = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VacuumStmt", 0);

  /* "pglast/ast.pyx":1444
 * 
 * cdef create_VacuumStmt(structs.VacuumStmt* data, offset_to_index):
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_rels = _pg_list_to_tuple(data.rels, offset_to_index)
 *     cdef object v_is_vacuumcmd = bool(data.is_vacuumcmd)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1444, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1445
 * cdef create_VacuumStmt(structs.VacuumStmt* data, offset_to_index):
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_rels = _pg_list_to_tuple(data.rels, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_is_vacuumcmd = bool(data.is_vacuumcmd)
 *     return ast.VacuumStmt(v_options, v_rels, v_is_vacuumcmd)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->rels, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1445, __pyx_L1_error)
  __pyx_v_v_rels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1446
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_rels = _pg_list_to_tuple(data.rels, offset_to_index)
 *     cdef object v_is_vacuumcmd = bool(data.is_vacuumcmd)             # <<<<<<<<<<<<<<
 *     return ast.VacuumStmt(v_options, v_rels, v_is_vacuumcmd)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_vacuumcmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_vacuumcmd = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1447
 *     cdef tuple v_rels = _pg_list_to_tuple(data.rels, offset_to_index)
 *     cdef object v_is_vacuumcmd = bool(data.is_vacuumcmd)
 *     return ast.VacuumStmt(v_options, v_rels, v_is_vacuumcmd)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VacuumStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_options, __pyx_v_v_rels, __pyx_v_v_is_vacuumcmd};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1443
 * 
 * 
 * cdef create_VacuumStmt(structs.VacuumStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_rels = _pg_list_to_tuple(data.rels, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_VacuumStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_rels);
  __Pyx_XDECREF(__pyx_v_v_is_vacuumcmd);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1450
 * 
 * 
 * cdef create_VacuumRelation(structs.VacuumRelation* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_va_cols = _pg_list_to_tuple(data.va_cols, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_VacuumRelation(VacuumRelation *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_va_cols = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VacuumRelation", 0);

  /* "pglast/ast.pyx":1451
 * 
 * cdef create_VacuumRelation(structs.VacuumRelation* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_va_cols = _pg_list_to_tuple(data.va_cols, offset_to_index)
 *     return ast.VacuumRelation(v_relation, v_va_cols)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1452
 * cdef create_VacuumRelation(structs.VacuumRelation* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_va_cols = _pg_list_to_tuple(data.va_cols, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.VacuumRelation(v_relation, v_va_cols)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->va_cols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1452, __pyx_L1_error)
  __pyx_v_v_va_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1453
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_va_cols = _pg_list_to_tuple(data.va_cols, offset_to_index)
 *     return ast.VacuumRelation(v_relation, v_va_cols)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_VacuumRelation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_va_cols};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __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;

  /* "pglast/ast.pyx":1450
 * 
 * 
 * cdef create_VacuumRelation(structs.VacuumRelation* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef tuple v_va_cols = _pg_list_to_tuple(data.va_cols, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_VacuumRelation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_va_cols);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1456
 * 
 * 
 * cdef create_ExplainStmt(structs.ExplainStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ExplainStmt(ExplainStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_query = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ExplainStmt", 0);

  /* "pglast/ast.pyx":1457
 * 
 * cdef create_ExplainStmt(structs.ExplainStmt* data, offset_to_index):
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.ExplainStmt(v_query, v_options)
 */
  if ((__pyx_v_data->query != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_query = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1458
 * cdef create_ExplainStmt(structs.ExplainStmt* data, offset_to_index):
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.ExplainStmt(v_query, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1458, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1459
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.ExplainStmt(v_query, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ExplainStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_query, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __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;

  /* "pglast/ast.pyx":1456
 * 
 * 
 * cdef create_ExplainStmt(structs.ExplainStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_ExplainStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_query);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1462
 * 
 * 
 * cdef create_CreateTableAsStmt(structs.CreateTableAsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_into = create(data.into, offset_to_index) if data.into is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateTableAsStmt(CreateTableAsStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_query = 0;
  PyObject *__pyx_v_v_into = 0;
  PyObject *__pyx_v_v_objtype = 0;
  PyObject *__pyx_v_v_is_select_into = 0;
  PyObject *__pyx_v_v_if_not_exists = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTableAsStmt", 0);

  /* "pglast/ast.pyx":1463
 * 
 * cdef create_CreateTableAsStmt(structs.CreateTableAsStmt* data, offset_to_index):
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_into = create(data.into, offset_to_index) if data.into is not NULL else None
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 */
  if ((__pyx_v_data->query != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_query = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1464
 * cdef create_CreateTableAsStmt(structs.CreateTableAsStmt* data, offset_to_index):
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_into = create(data.into, offset_to_index) if data.into is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_is_select_into = bool(data.is_select_into)
 */
  if ((__pyx_v_data->into != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->into, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_into = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1465
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_into = create(data.into, offset_to_index) if data.into is not NULL else None
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)             # <<<<<<<<<<<<<<
 *     cdef object v_is_select_into = bool(data.is_select_into)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1466
 *     cdef object v_into = create(data.into, offset_to_index) if data.into is not NULL else None
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_is_select_into = bool(data.is_select_into)             # <<<<<<<<<<<<<<
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateTableAsStmt(v_query, v_into, v_objtype, v_is_select_into, v_if_not_exists)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->is_select_into); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_select_into = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1467
 *     cdef object v_objtype = getattr(enums, 'ObjectType')(data.objtype)
 *     cdef object v_is_select_into = bool(data.is_select_into)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)             # <<<<<<<<<<<<<<
 *     return ast.CreateTableAsStmt(v_query, v_into, v_objtype, v_is_select_into, v_if_not_exists)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->if_not_exists); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1468
 *     cdef object v_is_select_into = bool(data.is_select_into)
 *     cdef object v_if_not_exists = bool(data.if_not_exists)
 *     return ast.CreateTableAsStmt(v_query, v_into, v_objtype, v_is_select_into, v_if_not_exists)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateTableAsStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_query, __pyx_v_v_into, __pyx_v_v_objtype, __pyx_v_v_is_select_into, __pyx_v_v_if_not_exists};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __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;

  /* "pglast/ast.pyx":1462
 * 
 * 
 * cdef create_CreateTableAsStmt(structs.CreateTableAsStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_into = create(data.into, offset_to_index) if data.into is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateTableAsStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_query);
  __Pyx_XDECREF(__pyx_v_v_into);
  __Pyx_XDECREF(__pyx_v_v_objtype);
  __Pyx_XDECREF(__pyx_v_v_is_select_into);
  __Pyx_XDECREF(__pyx_v_v_if_not_exists);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1471
 * 
 * 
 * cdef create_RefreshMatViewStmt(structs.RefreshMatViewStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_concurrent = bool(data.concurrent)
 *     cdef object v_skipData = bool(data.skipData)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RefreshMatViewStmt(RefreshMatViewStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_concurrent = 0;
  PyObject *__pyx_v_v_skipData = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RefreshMatViewStmt", 0);

  /* "pglast/ast.pyx":1472
 * 
 * cdef create_RefreshMatViewStmt(structs.RefreshMatViewStmt* data, offset_to_index):
 *     cdef object v_concurrent = bool(data.concurrent)             # <<<<<<<<<<<<<<
 *     cdef object v_skipData = bool(data.skipData)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->concurrent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_concurrent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1473
 * cdef create_RefreshMatViewStmt(structs.RefreshMatViewStmt* data, offset_to_index):
 *     cdef object v_concurrent = bool(data.concurrent)
 *     cdef object v_skipData = bool(data.skipData)             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     return ast.RefreshMatViewStmt(v_concurrent, v_skipData, v_relation)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->skipData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skipData = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1474
 *     cdef object v_concurrent = bool(data.concurrent)
 *     cdef object v_skipData = bool(data.skipData)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.RefreshMatViewStmt(v_concurrent, v_skipData, v_relation)
 * 
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1475
 *     cdef object v_skipData = bool(data.skipData)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     return ast.RefreshMatViewStmt(v_concurrent, v_skipData, v_relation)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RefreshMatViewStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_concurrent, __pyx_v_v_skipData, __pyx_v_v_relation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1471
 * 
 * 
 * cdef create_RefreshMatViewStmt(structs.RefreshMatViewStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_concurrent = bool(data.concurrent)
 *     cdef object v_skipData = bool(data.skipData)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RefreshMatViewStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_concurrent);
  __Pyx_XDECREF(__pyx_v_v_skipData);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1478
 * 
 * 
 * cdef create_CheckPointStmt(structs.CheckPointStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     return ast.CheckPointStmt()
 * 
 */

static PyObject *__pyx_f_6pglast_6parser_create_CheckPointStmt(CYTHON_UNUSED CheckPointStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CheckPointStmt", 0);

  /* "pglast/ast.pyx":1479
 * 
 * cdef create_CheckPointStmt(structs.CheckPointStmt* data, offset_to_index):
 *     return ast.CheckPointStmt()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CheckPointStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __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;

  /* "pglast/ast.pyx":1478
 * 
 * 
 * cdef create_CheckPointStmt(structs.CheckPointStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     return ast.CheckPointStmt()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CheckPointStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1482
 * 
 * 
 * cdef create_DiscardStmt(structs.DiscardStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_target = getattr(enums, 'DiscardMode')(data.target)
 *     return ast.DiscardStmt(v_target)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DiscardStmt(DiscardStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_target = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DiscardStmt", 0);

  /* "pglast/ast.pyx":1483
 * 
 * cdef create_DiscardStmt(structs.DiscardStmt* data, offset_to_index):
 *     cdef object v_target = getattr(enums, 'DiscardMode')(data.target)             # <<<<<<<<<<<<<<
 *     return ast.DiscardStmt(v_target)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_DiscardMode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_DiscardMode(__pyx_v_data->target); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_target = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1484
 * cdef create_DiscardStmt(structs.DiscardStmt* data, offset_to_index):
 *     cdef object v_target = getattr(enums, 'DiscardMode')(data.target)
 *     return ast.DiscardStmt(v_target)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DiscardStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_target};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __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;

  /* "pglast/ast.pyx":1482
 * 
 * 
 * cdef create_DiscardStmt(structs.DiscardStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_target = getattr(enums, 'DiscardMode')(data.target)
 *     return ast.DiscardStmt(v_target)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_DiscardStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_target);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1487
 * 
 * 
 * cdef create_LockStmt(structs.LockStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_mode = data.mode
 */

static PyObject *__pyx_f_6pglast_6parser_create_LockStmt(LockStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relations = 0;
  PyObject *__pyx_v_v_mode = 0;
  PyObject *__pyx_v_v_nowait = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_LockStmt", 0);

  /* "pglast/ast.pyx":1488
 * 
 * cdef create_LockStmt(structs.LockStmt* data, offset_to_index):
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_mode = data.mode
 *     cdef object v_nowait = bool(data.nowait)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->relations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1488, __pyx_L1_error)
  __pyx_v_v_relations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1489
 * cdef create_LockStmt(structs.LockStmt* data, offset_to_index):
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_mode = data.mode             # <<<<<<<<<<<<<<
 *     cdef object v_nowait = bool(data.nowait)
 *     return ast.LockStmt(v_relations, v_mode, v_nowait)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_mode = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1490
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_mode = data.mode
 *     cdef object v_nowait = bool(data.nowait)             # <<<<<<<<<<<<<<
 *     return ast.LockStmt(v_relations, v_mode, v_nowait)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->nowait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nowait = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1491
 *     cdef object v_mode = data.mode
 *     cdef object v_nowait = bool(data.nowait)
 *     return ast.LockStmt(v_relations, v_mode, v_nowait)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LockStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_relations, __pyx_v_v_mode, __pyx_v_v_nowait};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1487
 * 
 * 
 * cdef create_LockStmt(structs.LockStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_relations = _pg_list_to_tuple(data.relations, offset_to_index)
 *     cdef object v_mode = data.mode
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_LockStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relations);
  __Pyx_XDECREF(__pyx_v_v_mode);
  __Pyx_XDECREF(__pyx_v_v_nowait);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1494
 * 
 * 
 * cdef create_ConstraintsSetStmt(structs.ConstraintsSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef object v_deferred = bool(data.deferred)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ConstraintsSetStmt(ConstraintsSetStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_constraints = 0;
  PyObject *__pyx_v_v_deferred = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ConstraintsSetStmt", 0);

  /* "pglast/ast.pyx":1495
 * 
 * cdef create_ConstraintsSetStmt(structs.ConstraintsSetStmt* data, offset_to_index):
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_deferred = bool(data.deferred)
 *     return ast.ConstraintsSetStmt(v_constraints, v_deferred)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->constraints, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1495, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1496
 * cdef create_ConstraintsSetStmt(structs.ConstraintsSetStmt* data, offset_to_index):
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef object v_deferred = bool(data.deferred)             # <<<<<<<<<<<<<<
 *     return ast.ConstraintsSetStmt(v_constraints, v_deferred)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->deferred); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1497
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef object v_deferred = bool(data.deferred)
 *     return ast.ConstraintsSetStmt(v_constraints, v_deferred)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ConstraintsSetStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_constraints, __pyx_v_v_deferred};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1494
 * 
 * 
 * cdef create_ConstraintsSetStmt(structs.ConstraintsSetStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef object v_deferred = bool(data.deferred)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ConstraintsSetStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_constraints);
  __Pyx_XDECREF(__pyx_v_v_deferred);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1500
 * 
 * 
 * cdef create_ReindexStmt(structs.ReindexStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'ReindexObjectType')(data.kind)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_ReindexStmt(ReindexStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_params = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReindexStmt", 0);

  /* "pglast/ast.pyx":1501
 * 
 * cdef create_ReindexStmt(structs.ReindexStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'ReindexObjectType')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ReindexObjectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ReindexObjectType(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1502
 * cdef create_ReindexStmt(structs.ReindexStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'ReindexObjectType')(data.kind)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1503
 *     cdef object v_kind = getattr(enums, 'ReindexObjectType')(data.kind)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.ReindexStmt(v_kind, v_relation, v_name, v_params)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_6 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1504
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.ReindexStmt(v_kind, v_relation, v_name, v_params)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->params, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1504, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1505
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.ReindexStmt(v_kind, v_relation, v_name, v_params)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ReindexStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_relation, __pyx_v_v_name, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __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;

  /* "pglast/ast.pyx":1500
 * 
 * 
 * cdef create_ReindexStmt(structs.ReindexStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'ReindexObjectType')(data.kind)
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ReindexStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_params);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1508
 * 
 * 
 * cdef create_CreateConversionStmt(structs.CreateConversionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_conversion_name = _pg_list_to_tuple(data.conversion_name, offset_to_index)
 *     cdef object v_for_encoding_name = data.for_encoding_name.decode("utf-8") if data.for_encoding_name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateConversionStmt(CreateConversionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_conversion_name = 0;
  PyObject *__pyx_v_v_for_encoding_name = 0;
  PyObject *__pyx_v_v_to_encoding_name = 0;
  PyObject *__pyx_v_v_func_name = 0;
  PyObject *__pyx_v_v_def_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateConversionStmt", 0);

  /* "pglast/ast.pyx":1509
 * 
 * cdef create_CreateConversionStmt(structs.CreateConversionStmt* data, offset_to_index):
 *     cdef tuple v_conversion_name = _pg_list_to_tuple(data.conversion_name, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_for_encoding_name = data.for_encoding_name.decode("utf-8") if data.for_encoding_name is not NULL else None
 *     cdef object v_to_encoding_name = data.to_encoding_name.decode("utf-8") if data.to_encoding_name is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->conversion_name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1509, __pyx_L1_error)
  __pyx_v_v_conversion_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1510
 * cdef create_CreateConversionStmt(structs.CreateConversionStmt* data, offset_to_index):
 *     cdef tuple v_conversion_name = _pg_list_to_tuple(data.conversion_name, offset_to_index)
 *     cdef object v_for_encoding_name = data.for_encoding_name.decode("utf-8") if data.for_encoding_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_to_encoding_name = data.to_encoding_name.decode("utf-8") if data.to_encoding_name is not NULL else None
 *     cdef tuple v_func_name = _pg_list_to_tuple(data.func_name, offset_to_index)
 */
  if ((__pyx_v_data->for_encoding_name != NULL)) {
    __pyx_t_2 = __pyx_v_data->for_encoding_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_for_encoding_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1511
 *     cdef tuple v_conversion_name = _pg_list_to_tuple(data.conversion_name, offset_to_index)
 *     cdef object v_for_encoding_name = data.for_encoding_name.decode("utf-8") if data.for_encoding_name is not NULL else None
 *     cdef object v_to_encoding_name = data.to_encoding_name.decode("utf-8") if data.to_encoding_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_func_name = _pg_list_to_tuple(data.func_name, offset_to_index)
 *     cdef object v_def_ = bool(data.def_)
 */
  if ((__pyx_v_data->to_encoding_name != NULL)) {
    __pyx_t_4 = __pyx_v_data->to_encoding_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_to_encoding_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1512
 *     cdef object v_for_encoding_name = data.for_encoding_name.decode("utf-8") if data.for_encoding_name is not NULL else None
 *     cdef object v_to_encoding_name = data.to_encoding_name.decode("utf-8") if data.to_encoding_name is not NULL else None
 *     cdef tuple v_func_name = _pg_list_to_tuple(data.func_name, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_def_ = bool(data.def_)
 *     return ast.CreateConversionStmt(v_conversion_name, v_for_encoding_name, v_to_encoding_name, v_func_name, v_def_)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->func_name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1512, __pyx_L1_error)
  __pyx_v_v_func_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1513
 *     cdef object v_to_encoding_name = data.to_encoding_name.decode("utf-8") if data.to_encoding_name is not NULL else None
 *     cdef tuple v_func_name = _pg_list_to_tuple(data.func_name, offset_to_index)
 *     cdef object v_def_ = bool(data.def_)             # <<<<<<<<<<<<<<
 *     return ast.CreateConversionStmt(v_conversion_name, v_for_encoding_name, v_to_encoding_name, v_func_name, v_def_)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->def); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_def_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1514
 *     cdef tuple v_func_name = _pg_list_to_tuple(data.func_name, offset_to_index)
 *     cdef object v_def_ = bool(data.def_)
 *     return ast.CreateConversionStmt(v_conversion_name, v_for_encoding_name, v_to_encoding_name, v_func_name, v_def_)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateConversionStmt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_conversion_name, __pyx_v_v_for_encoding_name, __pyx_v_v_to_encoding_name, __pyx_v_v_func_name, __pyx_v_v_def_};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 5+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1508
 * 
 * 
 * cdef create_CreateConversionStmt(structs.CreateConversionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_conversion_name = _pg_list_to_tuple(data.conversion_name, offset_to_index)
 *     cdef object v_for_encoding_name = data.for_encoding_name.decode("utf-8") if data.for_encoding_name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_CreateConversionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_conversion_name);
  __Pyx_XDECREF(__pyx_v_v_for_encoding_name);
  __Pyx_XDECREF(__pyx_v_v_to_encoding_name);
  __Pyx_XDECREF(__pyx_v_v_func_name);
  __Pyx_XDECREF(__pyx_v_v_def_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1517
 * 
 * 
 * cdef create_CreateCastStmt(structs.CreateCastStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sourcetype = create(data.sourcetype, offset_to_index) if data.sourcetype is not NULL else None
 *     cdef object v_targettype = create(data.targettype, offset_to_index) if data.targettype is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateCastStmt(CreateCastStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_sourcetype = 0;
  PyObject *__pyx_v_v_targettype = 0;
  PyObject *__pyx_v_v_func = 0;
  PyObject *__pyx_v_v_context = 0;
  PyObject *__pyx_v_v_inout = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateCastStmt", 0);

  /* "pglast/ast.pyx":1518
 * 
 * cdef create_CreateCastStmt(structs.CreateCastStmt* data, offset_to_index):
 *     cdef object v_sourcetype = create(data.sourcetype, offset_to_index) if data.sourcetype is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_targettype = create(data.targettype, offset_to_index) if data.targettype is not NULL else None
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 */
  if ((__pyx_v_data->sourcetype != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sourcetype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_sourcetype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1519
 * cdef create_CreateCastStmt(structs.CreateCastStmt* data, offset_to_index):
 *     cdef object v_sourcetype = create(data.sourcetype, offset_to_index) if data.sourcetype is not NULL else None
 *     cdef object v_targettype = create(data.targettype, offset_to_index) if data.targettype is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef object v_context = getattr(enums, 'CoercionContext')(data.context)
 */
  if ((__pyx_v_data->targettype != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->targettype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_targettype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1520
 *     cdef object v_sourcetype = create(data.sourcetype, offset_to_index) if data.sourcetype is not NULL else None
 *     cdef object v_targettype = create(data.targettype, offset_to_index) if data.targettype is not NULL else None
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_context = getattr(enums, 'CoercionContext')(data.context)
 *     cdef object v_inout = bool(data.inout)
 */
  if ((__pyx_v_data->func != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->func, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_func = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1521
 *     cdef object v_targettype = create(data.targettype, offset_to_index) if data.targettype is not NULL else None
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef object v_context = getattr(enums, 'CoercionContext')(data.context)             # <<<<<<<<<<<<<<
 *     cdef object v_inout = bool(data.inout)
 *     return ast.CreateCastStmt(v_sourcetype, v_targettype, v_func, v_context, v_inout)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionContext(__pyx_v_data->context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_context = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1522
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef object v_context = getattr(enums, 'CoercionContext')(data.context)
 *     cdef object v_inout = bool(data.inout)             # <<<<<<<<<<<<<<
 *     return ast.CreateCastStmt(v_sourcetype, v_targettype, v_func, v_context, v_inout)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->inout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inout = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1523
 *     cdef object v_context = getattr(enums, 'CoercionContext')(data.context)
 *     cdef object v_inout = bool(data.inout)
 *     return ast.CreateCastStmt(v_sourcetype, v_targettype, v_func, v_context, v_inout)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateCastStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_sourcetype, __pyx_v_v_targettype, __pyx_v_v_func, __pyx_v_v_context, __pyx_v_v_inout};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __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;

  /* "pglast/ast.pyx":1517
 * 
 * 
 * cdef create_CreateCastStmt(structs.CreateCastStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sourcetype = create(data.sourcetype, offset_to_index) if data.sourcetype is not NULL else None
 *     cdef object v_targettype = create(data.targettype, offset_to_index) if data.targettype is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CreateCastStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_sourcetype);
  __Pyx_XDECREF(__pyx_v_v_targettype);
  __Pyx_XDECREF(__pyx_v_v_func);
  __Pyx_XDECREF(__pyx_v_v_context);
  __Pyx_XDECREF(__pyx_v_v_inout);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1526
 * 
 * 
 * cdef create_CreateTransformStmt(structs.CreateTransformStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_type_name = create(data.type_name, offset_to_index) if data.type_name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateTransformStmt(CreateTransformStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_v_v_type_name = 0;
  PyObject *__pyx_v_v_lang = 0;
  PyObject *__pyx_v_v_fromsql = 0;
  PyObject *__pyx_v_v_tosql = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTransformStmt", 0);

  /* "pglast/ast.pyx":1527
 * 
 * cdef create_CreateTransformStmt(structs.CreateTransformStmt* data, offset_to_index):
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     cdef object v_type_name = create(data.type_name, offset_to_index) if data.type_name is not NULL else None
 *     cdef object v_lang = data.lang.decode("utf-8") if data.lang is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1528
 * cdef create_CreateTransformStmt(structs.CreateTransformStmt* data, offset_to_index):
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_type_name = create(data.type_name, offset_to_index) if data.type_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_lang = data.lang.decode("utf-8") if data.lang is not NULL else None
 *     cdef object v_fromsql = create(data.fromsql, offset_to_index) if data.fromsql is not NULL else None
 */
  if ((__pyx_v_data->type_name != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->type_name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_type_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1529
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_type_name = create(data.type_name, offset_to_index) if data.type_name is not NULL else None
 *     cdef object v_lang = data.lang.decode("utf-8") if data.lang is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_fromsql = create(data.fromsql, offset_to_index) if data.fromsql is not NULL else None
 *     cdef object v_tosql = create(data.tosql, offset_to_index) if data.tosql is not NULL else None
 */
  if ((__pyx_v_data->lang != NULL)) {
    __pyx_t_4 = __pyx_v_data->lang;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_lang = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1530
 *     cdef object v_type_name = create(data.type_name, offset_to_index) if data.type_name is not NULL else None
 *     cdef object v_lang = data.lang.decode("utf-8") if data.lang is not NULL else None
 *     cdef object v_fromsql = create(data.fromsql, offset_to_index) if data.fromsql is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_tosql = create(data.tosql, offset_to_index) if data.tosql is not NULL else None
 *     return ast.CreateTransformStmt(v_replace, v_type_name, v_lang, v_fromsql, v_tosql)
 */
  if ((__pyx_v_data->fromsql != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->fromsql, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_fromsql = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1531
 *     cdef object v_lang = data.lang.decode("utf-8") if data.lang is not NULL else None
 *     cdef object v_fromsql = create(data.fromsql, offset_to_index) if data.fromsql is not NULL else None
 *     cdef object v_tosql = create(data.tosql, offset_to_index) if data.tosql is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.CreateTransformStmt(v_replace, v_type_name, v_lang, v_fromsql, v_tosql)
 * 
 */
  if ((__pyx_v_data->tosql != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->tosql, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tosql = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1532
 *     cdef object v_fromsql = create(data.fromsql, offset_to_index) if data.fromsql is not NULL else None
 *     cdef object v_tosql = create(data.tosql, offset_to_index) if data.tosql is not NULL else None
 *     return ast.CreateTransformStmt(v_replace, v_type_name, v_lang, v_fromsql, v_tosql)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateTransformStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_replace, __pyx_v_v_type_name, __pyx_v_v_lang, __pyx_v_v_fromsql, __pyx_v_v_tosql};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 5+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1526
 * 
 * 
 * cdef create_CreateTransformStmt(structs.CreateTransformStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_type_name = create(data.type_name, offset_to_index) if data.type_name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateTransformStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XDECREF(__pyx_v_v_type_name);
  __Pyx_XDECREF(__pyx_v_v_lang);
  __Pyx_XDECREF(__pyx_v_v_fromsql);
  __Pyx_XDECREF(__pyx_v_v_tosql);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1535
 * 
 * 
 * cdef create_PrepareStmt(structs.PrepareStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_argtypes = _pg_list_to_tuple(data.argtypes, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_PrepareStmt(PrepareStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_argtypes = 0;
  PyObject *__pyx_v_v_query = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PrepareStmt", 0);

  /* "pglast/ast.pyx":1536
 * 
 * cdef create_PrepareStmt(structs.PrepareStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_argtypes = _pg_list_to_tuple(data.argtypes, offset_to_index)
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1537
 * cdef create_PrepareStmt(structs.PrepareStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_argtypes = _pg_list_to_tuple(data.argtypes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     return ast.PrepareStmt(v_name, v_argtypes, v_query)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->argtypes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1537, __pyx_L1_error)
  __pyx_v_v_argtypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1538
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_argtypes = _pg_list_to_tuple(data.argtypes, offset_to_index)
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.PrepareStmt(v_name, v_argtypes, v_query)
 * 
 */
  if ((__pyx_v_data->query != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_query = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1539
 *     cdef tuple v_argtypes = _pg_list_to_tuple(data.argtypes, offset_to_index)
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     return ast.PrepareStmt(v_name, v_argtypes, v_query)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PrepareStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_name, __pyx_v_v_argtypes, __pyx_v_v_query};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1535
 * 
 * 
 * cdef create_PrepareStmt(structs.PrepareStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_argtypes = _pg_list_to_tuple(data.argtypes, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_PrepareStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_argtypes);
  __Pyx_XDECREF(__pyx_v_v_query);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1542
 * 
 * 
 * cdef create_ExecuteStmt(structs.ExecuteStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ExecuteStmt(ExecuteStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_params = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ExecuteStmt", 0);

  /* "pglast/ast.pyx":1543
 * 
 * cdef create_ExecuteStmt(structs.ExecuteStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.ExecuteStmt(v_name, v_params)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1544
 * cdef create_ExecuteStmt(structs.ExecuteStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.ExecuteStmt(v_name, v_params)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->params, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1544, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1545
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 *     return ast.ExecuteStmt(v_name, v_params)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ExecuteStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_name, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1542
 * 
 * 
 * cdef create_ExecuteStmt(structs.ExecuteStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_params = _pg_list_to_tuple(data.params, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ExecuteStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_params);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1548
 * 
 * 
 * cdef create_DeallocateStmt(structs.DeallocateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.DeallocateStmt(v_name)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DeallocateStmt(DeallocateStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DeallocateStmt", 0);

  /* "pglast/ast.pyx":1549
 * 
 * cdef create_DeallocateStmt(structs.DeallocateStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.DeallocateStmt(v_name)
 * 
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_2 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1550
 * cdef create_DeallocateStmt(structs.DeallocateStmt* data, offset_to_index):
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.DeallocateStmt(v_name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DeallocateStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1548
 * 
 * 
 * cdef create_DeallocateStmt(structs.DeallocateStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.DeallocateStmt(v_name)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_DeallocateStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1553
 * 
 * 
 * cdef create_DropOwnedStmt(structs.DropOwnedStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DropOwnedStmt(DropOwnedStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_roles = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropOwnedStmt", 0);

  /* "pglast/ast.pyx":1554
 * 
 * cdef create_DropOwnedStmt(structs.DropOwnedStmt* data, offset_to_index):
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.DropOwnedStmt(v_roles, v_behavior)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1554, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1555
 * cdef create_DropOwnedStmt(structs.DropOwnedStmt* data, offset_to_index):
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     return ast.DropOwnedStmt(v_roles, v_behavior)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1556
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.DropOwnedStmt(v_roles, v_behavior)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DropOwnedStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_roles, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __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;

  /* "pglast/ast.pyx":1553
 * 
 * 
 * cdef create_DropOwnedStmt(structs.DropOwnedStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_DropOwnedStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_roles);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1559
 * 
 * 
 * cdef create_ReassignOwnedStmt(structs.ReassignOwnedStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_newrole = create(data.newrole, offset_to_index) if data.newrole is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_ReassignOwnedStmt(ReassignOwnedStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_roles = 0;
  PyObject *__pyx_v_v_newrole = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReassignOwnedStmt", 0);

  /* "pglast/ast.pyx":1560
 * 
 * cdef create_ReassignOwnedStmt(structs.ReassignOwnedStmt* data, offset_to_index):
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_newrole = create(data.newrole, offset_to_index) if data.newrole is not NULL else None
 *     return ast.ReassignOwnedStmt(v_roles, v_newrole)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->roles, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1560, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1561
 * cdef create_ReassignOwnedStmt(structs.ReassignOwnedStmt* data, offset_to_index):
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_newrole = create(data.newrole, offset_to_index) if data.newrole is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.ReassignOwnedStmt(v_roles, v_newrole)
 * 
 */
  if ((__pyx_v_data->newrole != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->newrole, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_newrole = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1562
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_newrole = create(data.newrole, offset_to_index) if data.newrole is not NULL else None
 *     return ast.ReassignOwnedStmt(v_roles, v_newrole)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ReassignOwnedStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_roles, __pyx_v_v_newrole};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __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;

  /* "pglast/ast.pyx":1559
 * 
 * 
 * cdef create_ReassignOwnedStmt(structs.ReassignOwnedStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_roles = _pg_list_to_tuple(data.roles, offset_to_index)
 *     cdef object v_newrole = create(data.newrole, offset_to_index) if data.newrole is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_ReassignOwnedStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_roles);
  __Pyx_XDECREF(__pyx_v_v_newrole);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1565
 * 
 * 
 * cdef create_AlterTSDictionaryStmt(structs.AlterTSDictionaryStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_dictname = _pg_list_to_tuple(data.dictname, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterTSDictionaryStmt(AlterTSDictionaryStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_dictname = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTSDictionaryStmt", 0);

  /* "pglast/ast.pyx":1566
 * 
 * cdef create_AlterTSDictionaryStmt(structs.AlterTSDictionaryStmt* data, offset_to_index):
 *     cdef tuple v_dictname = _pg_list_to_tuple(data.dictname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterTSDictionaryStmt(v_dictname, v_options)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->dictname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1566, __pyx_L1_error)
  __pyx_v_v_dictname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1567
 * cdef create_AlterTSDictionaryStmt(structs.AlterTSDictionaryStmt* data, offset_to_index):
 *     cdef tuple v_dictname = _pg_list_to_tuple(data.dictname, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterTSDictionaryStmt(v_dictname, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1567, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1568
 *     cdef tuple v_dictname = _pg_list_to_tuple(data.dictname, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterTSDictionaryStmt(v_dictname, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlterTSDictionaryStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_dictname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __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;

  /* "pglast/ast.pyx":1565
 * 
 * 
 * cdef create_AlterTSDictionaryStmt(structs.AlterTSDictionaryStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_dictname = _pg_list_to_tuple(data.dictname, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlterTSDictionaryStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_dictname);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1571
 * 
 * 
 * cdef create_AlterTSConfigurationStmt(structs.AlterTSConfigurationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'AlterTSConfigType')(data.kind)
 *     cdef tuple v_cfgname = _pg_list_to_tuple(data.cfgname, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterTSConfigurationStmt(AlterTSConfigurationStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_cfgname = 0;
  PyObject *__pyx_v_v_tokentype = 0;
  PyObject *__pyx_v_v_dicts = 0;
  PyObject *__pyx_v_v_override = 0;
  PyObject *__pyx_v_v_replace = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTSConfigurationStmt", 0);

  /* "pglast/ast.pyx":1572
 * 
 * cdef create_AlterTSConfigurationStmt(structs.AlterTSConfigurationStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'AlterTSConfigType')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef tuple v_cfgname = _pg_list_to_tuple(data.cfgname, offset_to_index)
 *     cdef tuple v_tokentype = _pg_list_to_tuple(data.tokentype, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_AlterTSConfigType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_AlterTSConfigType(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1573
 * cdef create_AlterTSConfigurationStmt(structs.AlterTSConfigurationStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'AlterTSConfigType')(data.kind)
 *     cdef tuple v_cfgname = _pg_list_to_tuple(data.cfgname, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_tokentype = _pg_list_to_tuple(data.tokentype, offset_to_index)
 *     cdef tuple v_dicts = _pg_list_to_tuple(data.dicts, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->cfgname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1573, __pyx_L1_error)
  __pyx_v_v_cfgname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1574
 *     cdef object v_kind = getattr(enums, 'AlterTSConfigType')(data.kind)
 *     cdef tuple v_cfgname = _pg_list_to_tuple(data.cfgname, offset_to_index)
 *     cdef tuple v_tokentype = _pg_list_to_tuple(data.tokentype, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_dicts = _pg_list_to_tuple(data.dicts, offset_to_index)
 *     cdef object v_override = bool(data.override)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->tokentype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1574, __pyx_L1_error)
  __pyx_v_v_tokentype = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1575
 *     cdef tuple v_cfgname = _pg_list_to_tuple(data.cfgname, offset_to_index)
 *     cdef tuple v_tokentype = _pg_list_to_tuple(data.tokentype, offset_to_index)
 *     cdef tuple v_dicts = _pg_list_to_tuple(data.dicts, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_override = bool(data.override)
 *     cdef object v_replace = bool(data.replace)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->dicts, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1575, __pyx_L1_error)
  __pyx_v_v_dicts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1576
 *     cdef tuple v_tokentype = _pg_list_to_tuple(data.tokentype, offset_to_index)
 *     cdef tuple v_dicts = _pg_list_to_tuple(data.dicts, offset_to_index)
 *     cdef object v_override = bool(data.override)             # <<<<<<<<<<<<<<
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->override); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1577
 *     cdef tuple v_dicts = _pg_list_to_tuple(data.dicts, offset_to_index)
 *     cdef object v_override = bool(data.override)
 *     cdef object v_replace = bool(data.replace)             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterTSConfigurationStmt(v_kind, v_cfgname, v_tokentype, v_dicts, v_override, v_replace, v_missing_ok)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1578
 *     cdef object v_override = bool(data.override)
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.AlterTSConfigurationStmt(v_kind, v_cfgname, v_tokentype, v_dicts, v_override, v_replace, v_missing_ok)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1579
 *     cdef object v_replace = bool(data.replace)
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterTSConfigurationStmt(v_kind, v_cfgname, v_tokentype, v_dicts, v_override, v_replace, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterTSConfigurationStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_cfgname, __pyx_v_v_tokentype, __pyx_v_v_dicts, __pyx_v_v_override, __pyx_v_v_replace, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __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;

  /* "pglast/ast.pyx":1571
 * 
 * 
 * cdef create_AlterTSConfigurationStmt(structs.AlterTSConfigurationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'AlterTSConfigType')(data.kind)
 *     cdef tuple v_cfgname = _pg_list_to_tuple(data.cfgname, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterTSConfigurationStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_cfgname);
  __Pyx_XDECREF(__pyx_v_v_tokentype);
  __Pyx_XDECREF(__pyx_v_v_dicts);
  __Pyx_XDECREF(__pyx_v_v_override);
  __Pyx_XDECREF(__pyx_v_v_replace);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1582
 * 
 * 
 * cdef create_PublicationTable(structs.PublicationTable* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_PublicationTable(PublicationTable *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_relation = 0;
  PyObject *__pyx_v_v_whereClause = 0;
  PyObject *__pyx_v_v_columns = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PublicationTable", 0);

  /* "pglast/ast.pyx":1583
 * 
 * cdef create_PublicationTable(structs.PublicationTable* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 */
  if ((__pyx_v_data->relation != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1584
 * cdef create_PublicationTable(structs.PublicationTable* data, offset_to_index):
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     return ast.PublicationTable(v_relation, v_whereClause, v_columns)
 */
  if ((__pyx_v_data->whereClause != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1585
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.PublicationTable(v_relation, v_whereClause, v_columns)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->columns, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1585, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1586
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     return ast.PublicationTable(v_relation, v_whereClause, v_columns)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PublicationTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_relation, __pyx_v_v_whereClause, __pyx_v_v_columns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1586, __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;

  /* "pglast/ast.pyx":1582
 * 
 * 
 * cdef create_PublicationTable(structs.PublicationTable* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_relation = create(data.relation, offset_to_index) if data.relation is not NULL else None
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_PublicationTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_relation);
  __Pyx_XDECREF(__pyx_v_v_whereClause);
  __Pyx_XDECREF(__pyx_v_v_columns);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1589
 * 
 * 
 * cdef create_PublicationObjSpec(structs.PublicationObjSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_pubobjtype = getattr(enums, 'PublicationObjSpecType')(data.pubobjtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_PublicationObjSpec(PublicationObjSpec *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_pubobjtype = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_pubtable = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PublicationObjSpec", 0);

  /* "pglast/ast.pyx":1590
 * 
 * cdef create_PublicationObjSpec(structs.PublicationObjSpec* data, offset_to_index):
 *     cdef object v_pubobjtype = getattr(enums, 'PublicationObjSpecType')(data.pubobjtype)             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_pubtable = create(data.pubtable, offset_to_index) if data.pubtable is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_PublicationObjSpecType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_PublicationObjSpecType(__pyx_v_data->pubobjtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_pubobjtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1591
 * cdef create_PublicationObjSpec(structs.PublicationObjSpec* data, offset_to_index):
 *     cdef object v_pubobjtype = getattr(enums, 'PublicationObjSpecType')(data.pubobjtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_pubtable = create(data.pubtable, offset_to_index) if data.pubtable is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_6 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1592
 *     cdef object v_pubobjtype = getattr(enums, 'PublicationObjSpecType')(data.pubobjtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_pubtable = create(data.pubtable, offset_to_index) if data.pubtable is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PublicationObjSpec(v_pubobjtype, v_name, v_pubtable, v_location)
 */
  if ((__pyx_v_data->pubtable != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->pubtable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_pubtable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1593
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_pubtable = create(data.pubtable, offset_to_index) if data.pubtable is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.PublicationObjSpec(v_pubobjtype, v_name, v_pubtable, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1594
 *     cdef object v_pubtable = create(data.pubtable, offset_to_index) if data.pubtable is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.PublicationObjSpec(v_pubobjtype, v_name, v_pubtable, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PublicationObjSpec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_pubobjtype, __pyx_v_v_name, __pyx_v_v_pubtable, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __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;

  /* "pglast/ast.pyx":1589
 * 
 * 
 * cdef create_PublicationObjSpec(structs.PublicationObjSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_pubobjtype = getattr(enums, 'PublicationObjSpecType')(data.pubobjtype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_PublicationObjSpec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_pubobjtype);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_pubtable);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1597
 * 
 * 
 * cdef create_CreatePublicationStmt(structs.CreatePublicationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreatePublicationStmt(CreatePublicationStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_pubname = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_pubobjects = 0;
  PyObject *__pyx_v_v_for_all_tables = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatePublicationStmt", 0);

  /* "pglast/ast.pyx":1598
 * 
 * cdef create_CreatePublicationStmt(structs.CreatePublicationStmt* data, offset_to_index):
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 */
  if ((__pyx_v_data->pubname != NULL)) {
    __pyx_t_2 = __pyx_v_data->pubname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_pubname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1599
 * cdef create_CreatePublicationStmt(structs.CreatePublicationStmt* data, offset_to_index):
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 *     cdef object v_for_all_tables = bool(data.for_all_tables)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1599, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1600
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_for_all_tables = bool(data.for_all_tables)
 *     return ast.CreatePublicationStmt(v_pubname, v_options, v_pubobjects, v_for_all_tables)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->pubobjects, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1600, __pyx_L1_error)
  __pyx_v_v_pubobjects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1601
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 *     cdef object v_for_all_tables = bool(data.for_all_tables)             # <<<<<<<<<<<<<<
 *     return ast.CreatePublicationStmt(v_pubname, v_options, v_pubobjects, v_for_all_tables)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->for_all_tables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_all_tables = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1602
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 *     cdef object v_for_all_tables = bool(data.for_all_tables)
 *     return ast.CreatePublicationStmt(v_pubname, v_options, v_pubobjects, v_for_all_tables)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreatePublicationStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_pubname, __pyx_v_v_options, __pyx_v_v_pubobjects, __pyx_v_v_for_all_tables};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1597
 * 
 * 
 * cdef create_CreatePublicationStmt(structs.CreatePublicationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreatePublicationStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_pubname);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_pubobjects);
  __Pyx_XDECREF(__pyx_v_v_for_all_tables);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1605
 * 
 * 
 * cdef create_AlterPublicationStmt(structs.AlterPublicationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterPublicationStmt(AlterPublicationStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_pubname = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_pubobjects = 0;
  PyObject *__pyx_v_v_for_all_tables = 0;
  PyObject *__pyx_v_v_action = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterPublicationStmt", 0);

  /* "pglast/ast.pyx":1606
 * 
 * cdef create_AlterPublicationStmt(structs.AlterPublicationStmt* data, offset_to_index):
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 */
  if ((__pyx_v_data->pubname != NULL)) {
    __pyx_t_2 = __pyx_v_data->pubname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_pubname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1607
 * cdef create_AlterPublicationStmt(structs.AlterPublicationStmt* data, offset_to_index):
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 *     cdef object v_for_all_tables = bool(data.for_all_tables)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1607, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1608
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_for_all_tables = bool(data.for_all_tables)
 *     cdef object v_action = getattr(enums, 'AlterPublicationAction')(data.action)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->pubobjects, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1608, __pyx_L1_error)
  __pyx_v_v_pubobjects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1609
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 *     cdef object v_for_all_tables = bool(data.for_all_tables)             # <<<<<<<<<<<<<<
 *     cdef object v_action = getattr(enums, 'AlterPublicationAction')(data.action)
 *     return ast.AlterPublicationStmt(v_pubname, v_options, v_pubobjects, v_for_all_tables, v_action)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->for_all_tables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_all_tables = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1610
 *     cdef tuple v_pubobjects = _pg_list_to_tuple(data.pubobjects, offset_to_index)
 *     cdef object v_for_all_tables = bool(data.for_all_tables)
 *     cdef object v_action = getattr(enums, 'AlterPublicationAction')(data.action)             # <<<<<<<<<<<<<<
 *     return ast.AlterPublicationStmt(v_pubname, v_options, v_pubobjects, v_for_all_tables, v_action)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_AlterPublicationAction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_AlterPublicationAction(__pyx_v_data->action); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1611
 *     cdef object v_for_all_tables = bool(data.for_all_tables)
 *     cdef object v_action = getattr(enums, 'AlterPublicationAction')(data.action)
 *     return ast.AlterPublicationStmt(v_pubname, v_options, v_pubobjects, v_for_all_tables, v_action)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_AlterPublicationStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_5, __pyx_v_v_pubname, __pyx_v_v_options, __pyx_v_v_pubobjects, __pyx_v_v_for_all_tables, __pyx_v_v_action};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 5+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1611, __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;

  /* "pglast/ast.pyx":1605
 * 
 * 
 * cdef create_AlterPublicationStmt(structs.AlterPublicationStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_pubname = data.pubname.decode("utf-8") if data.pubname is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_AlterPublicationStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_pubname);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_pubobjects);
  __Pyx_XDECREF(__pyx_v_v_for_all_tables);
  __Pyx_XDECREF(__pyx_v_v_action);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1614
 * 
 * 
 * cdef create_CreateSubscriptionStmt(structs.CreateSubscriptionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CreateSubscriptionStmt(CreateSubscriptionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_subname = 0;
  PyObject *__pyx_v_v_conninfo = 0;
  PyObject *__pyx_v_v_publication = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateSubscriptionStmt", 0);

  /* "pglast/ast.pyx":1615
 * 
 * cdef create_CreateSubscriptionStmt(structs.CreateSubscriptionStmt* data, offset_to_index):
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 */
  if ((__pyx_v_data->subname != NULL)) {
    __pyx_t_2 = __pyx_v_data->subname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_subname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1616
 * cdef create_CreateSubscriptionStmt(structs.CreateSubscriptionStmt* data, offset_to_index):
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->conninfo != NULL)) {
    __pyx_t_4 = __pyx_v_data->conninfo;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_conninfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1617
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateSubscriptionStmt(v_subname, v_conninfo, v_publication, v_options)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->publication, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1617, __pyx_L1_error)
  __pyx_v_v_publication = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1618
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.CreateSubscriptionStmt(v_subname, v_conninfo, v_publication, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1618, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1619
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.CreateSubscriptionStmt(v_subname, v_conninfo, v_publication, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CreateSubscriptionStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_subname, __pyx_v_v_conninfo, __pyx_v_v_publication, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1614
 * 
 * 
 * cdef create_CreateSubscriptionStmt(structs.CreateSubscriptionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_CreateSubscriptionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_subname);
  __Pyx_XDECREF(__pyx_v_v_conninfo);
  __Pyx_XDECREF(__pyx_v_v_publication);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1622
 * 
 * 
 * cdef create_AlterSubscriptionStmt(structs.AlterSubscriptionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'AlterSubscriptionType')(data.kind)
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlterSubscriptionStmt(AlterSubscriptionStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_kind = 0;
  PyObject *__pyx_v_v_subname = 0;
  PyObject *__pyx_v_v_conninfo = 0;
  PyObject *__pyx_v_v_publication = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterSubscriptionStmt", 0);

  /* "pglast/ast.pyx":1623
 * 
 * cdef create_AlterSubscriptionStmt(structs.AlterSubscriptionStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'AlterSubscriptionType')(data.kind)             # <<<<<<<<<<<<<<
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_AlterSubscriptionType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_AlterSubscriptionType(__pyx_v_data->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1624
 * cdef create_AlterSubscriptionStmt(structs.AlterSubscriptionStmt* data, offset_to_index):
 *     cdef object v_kind = getattr(enums, 'AlterSubscriptionType')(data.kind)
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 */
  if ((__pyx_v_data->subname != NULL)) {
    __pyx_t_6 = __pyx_v_data->subname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_subname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1625
 *     cdef object v_kind = getattr(enums, 'AlterSubscriptionType')(data.kind)
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  if ((__pyx_v_data->conninfo != NULL)) {
    __pyx_t_7 = __pyx_v_data->conninfo;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_conninfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1626
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterSubscriptionStmt(v_kind, v_subname, v_conninfo, v_publication, v_options)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->publication, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1626, __pyx_L1_error)
  __pyx_v_v_publication = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1627
 *     cdef object v_conninfo = data.conninfo.decode("utf-8") if data.conninfo is not NULL else None
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlterSubscriptionStmt(v_kind, v_subname, v_conninfo, v_publication, v_options)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1627, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1628
 *     cdef tuple v_publication = _pg_list_to_tuple(data.publication, offset_to_index)
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     return ast.AlterSubscriptionStmt(v_kind, v_subname, v_conninfo, v_publication, v_options)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlterSubscriptionStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_subname, __pyx_v_v_conninfo, __pyx_v_v_publication, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __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;

  /* "pglast/ast.pyx":1622
 * 
 * 
 * cdef create_AlterSubscriptionStmt(structs.AlterSubscriptionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_kind = getattr(enums, 'AlterSubscriptionType')(data.kind)
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_AlterSubscriptionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_kind);
  __Pyx_XDECREF(__pyx_v_v_subname);
  __Pyx_XDECREF(__pyx_v_v_conninfo);
  __Pyx_XDECREF(__pyx_v_v_publication);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1631
 * 
 * 
 * cdef create_DropSubscriptionStmt(structs.DropSubscriptionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

static PyObject *__pyx_f_6pglast_6parser_create_DropSubscriptionStmt(DropSubscriptionStmt *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_subname = 0;
  PyObject *__pyx_v_v_missing_ok = 0;
  PyObject *__pyx_v_v_behavior = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropSubscriptionStmt", 0);

  /* "pglast/ast.pyx":1632
 * 
 * cdef create_DropSubscriptionStmt(structs.DropSubscriptionStmt* data, offset_to_index):
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 */
  if ((__pyx_v_data->subname != NULL)) {
    __pyx_t_2 = __pyx_v_data->subname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_subname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1633
 * cdef create_DropSubscriptionStmt(structs.DropSubscriptionStmt* data, offset_to_index):
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.DropSubscriptionStmt(v_subname, v_missing_ok, v_behavior)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->missing_ok); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1634
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)             # <<<<<<<<<<<<<<
 *     return ast.DropSubscriptionStmt(v_subname, v_missing_ok, v_behavior)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1635
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     cdef object v_behavior = getattr(enums, 'DropBehavior')(data.behavior)
 *     return ast.DropSubscriptionStmt(v_subname, v_missing_ok, v_behavior)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DropSubscriptionStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_subname, __pyx_v_v_missing_ok, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __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;

  /* "pglast/ast.pyx":1631
 * 
 * 
 * cdef create_DropSubscriptionStmt(structs.DropSubscriptionStmt* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subname = data.subname.decode("utf-8") if data.subname is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.create_DropSubscriptionStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_subname);
  __Pyx_XDECREF(__pyx_v_v_missing_ok);
  __Pyx_XDECREF(__pyx_v_v_behavior);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1638
 * 
 * 
 * cdef create_Alias(structs.Alias* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_aliasname = data.aliasname.decode("utf-8") if data.aliasname is not NULL else None
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_Alias(Alias *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_aliasname = 0;
  PyObject *__pyx_v_v_colnames = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Alias", 0);

  /* "pglast/ast.pyx":1639
 * 
 * cdef create_Alias(structs.Alias* data, offset_to_index):
 *     cdef object v_aliasname = data.aliasname.decode("utf-8") if data.aliasname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     return ast.Alias(v_aliasname, v_colnames)
 */
  if ((__pyx_v_data->aliasname != NULL)) {
    __pyx_t_2 = __pyx_v_data->aliasname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_aliasname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1640
 * cdef create_Alias(structs.Alias* data, offset_to_index):
 *     cdef object v_aliasname = data.aliasname.decode("utf-8") if data.aliasname is not NULL else None
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.Alias(v_aliasname, v_colnames)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1640, __pyx_L1_error)
  __pyx_v_v_colnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1641
 *     cdef object v_aliasname = data.aliasname.decode("utf-8") if data.aliasname is not NULL else None
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     return ast.Alias(v_aliasname, v_colnames)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Alias); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_aliasname, __pyx_v_v_colnames};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1638
 * 
 * 
 * cdef create_Alias(structs.Alias* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_aliasname = data.aliasname.decode("utf-8") if data.aliasname is not NULL else None
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_Alias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_aliasname);
  __Pyx_XDECREF(__pyx_v_v_colnames);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1644
 * 
 * 
 * cdef create_RangeVar(structs.RangeVar* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_catalogname = data.catalogname.decode("utf-8") if data.catalogname is not NULL else None
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeVar(RangeVar *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_catalogname = 0;
  PyObject *__pyx_v_v_schemaname = 0;
  PyObject *__pyx_v_v_relname = 0;
  PyObject *__pyx_v_v_inh = 0;
  PyObject *__pyx_v_v_relpersistence = 0;
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  char const *__pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeVar", 0);

  /* "pglast/ast.pyx":1645
 * 
 * cdef create_RangeVar(structs.RangeVar* data, offset_to_index):
 *     cdef object v_catalogname = data.catalogname.decode("utf-8") if data.catalogname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 */
  if ((__pyx_v_data->catalogname != NULL)) {
    __pyx_t_2 = __pyx_v_data->catalogname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_catalogname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1646
 * cdef create_RangeVar(structs.RangeVar* data, offset_to_index):
 *     cdef object v_catalogname = data.catalogname.decode("utf-8") if data.catalogname is not NULL else None
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 *     cdef object v_inh = bool(data.inh)
 */
  if ((__pyx_v_data->schemaname != NULL)) {
    __pyx_t_4 = __pyx_v_data->schemaname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_schemaname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1647
 *     cdef object v_catalogname = data.catalogname.decode("utf-8") if data.catalogname is not NULL else None
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_relpersistence = chr(data.relpersistence)
 */
  if ((__pyx_v_data->relname != NULL)) {
    __pyx_t_5 = __pyx_v_data->relname;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_relname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1648
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 *     cdef object v_inh = bool(data.inh)             # <<<<<<<<<<<<<<
 *     cdef object v_relpersistence = chr(data.relpersistence)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->inh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inh = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1649
 *     cdef object v_relname = data.relname.decode("utf-8") if data.relname is not NULL else None
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_relpersistence = chr(data.relpersistence)             # <<<<<<<<<<<<<<
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->relpersistence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_relpersistence = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":1650
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_relpersistence = chr(data.relpersistence)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeVar(v_catalogname, v_schemaname, v_relname, v_inh, v_relpersistence, v_alias, v_location)
 */
  if ((__pyx_v_data->alias != NULL)) {
    __pyx_t_1 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_v_v_alias = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":1651
 *     cdef object v_relpersistence = chr(data.relpersistence)
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.RangeVar(v_catalogname, v_schemaname, v_relname, v_inh, v_relpersistence, v_alias, v_location)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_7 = __pyx_v_offset_to_index; __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_9 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_v_v_location = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":1652
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RangeVar(v_catalogname, v_schemaname, v_relname, v_inh, v_relpersistence, v_alias, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_RangeVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_9 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_7, __pyx_v_v_catalogname, __pyx_v_v_schemaname, __pyx_v_v_relname, __pyx_v_v_inh, __pyx_v_v_relpersistence, __pyx_v_v_alias, __pyx_v_v_location};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 7+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1644
 * 
 * 
 * cdef create_RangeVar(structs.RangeVar* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_catalogname = data.catalogname.decode("utf-8") if data.catalogname is not NULL else None
 *     cdef object v_schemaname = data.schemaname.decode("utf-8") if data.schemaname is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pglast.parser.create_RangeVar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_catalogname);
  __Pyx_XDECREF(__pyx_v_v_schemaname);
  __Pyx_XDECREF(__pyx_v_v_relname);
  __Pyx_XDECREF(__pyx_v_v_inh);
  __Pyx_XDECREF(__pyx_v_v_relpersistence);
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1655
 * 
 * 
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_ns_uris = _pg_list_to_tuple(data.ns_uris, offset_to_index)
 *     cdef tuple v_ns_names = _pg_list_to_tuple(data.ns_names, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_TableFunc(TableFunc *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_ns_uris = 0;
  PyObject *__pyx_v_v_ns_names = 0;
  PyObject *__pyx_v_v_docexpr = 0;
  PyObject *__pyx_v_v_rowexpr = 0;
  PyObject *__pyx_v_v_colnames = 0;
  PyObject *__pyx_v_v_coltypes = 0;
  PyObject *__pyx_v_v_coltypmods = 0;
  PyObject *__pyx_v_v_colcollations = 0;
  PyObject *__pyx_v_v_colexprs = 0;
  PyObject *__pyx_v_v_coldefexprs = 0;
  PyObject *__pyx_v_v_notnulls = 0;
  PyObject *__pyx_v_v_ordinalitycol = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TableFunc", 0);

  /* "pglast/ast.pyx":1656
 * 
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):
 *     cdef tuple v_ns_uris = _pg_list_to_tuple(data.ns_uris, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_ns_names = _pg_list_to_tuple(data.ns_names, offset_to_index)
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->ns_uris, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1656, __pyx_L1_error)
  __pyx_v_v_ns_uris = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1657
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):
 *     cdef tuple v_ns_uris = _pg_list_to_tuple(data.ns_uris, offset_to_index)
 *     cdef tuple v_ns_names = _pg_list_to_tuple(data.ns_names, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->ns_names, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1657, __pyx_L1_error)
  __pyx_v_v_ns_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1658
 *     cdef tuple v_ns_uris = _pg_list_to_tuple(data.ns_uris, offset_to_index)
 *     cdef tuple v_ns_names = _pg_list_to_tuple(data.ns_names, offset_to_index)
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 */
  if ((__pyx_v_data->docexpr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->docexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_docexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1659
 *     cdef tuple v_ns_names = _pg_list_to_tuple(data.ns_names, offset_to_index)
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 */
  if ((__pyx_v_data->rowexpr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rowexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rowexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1660
 *     cdef object v_docexpr = create(data.docexpr, offset_to_index) if data.docexpr is not NULL else None
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1660, __pyx_L1_error)
  __pyx_v_v_colnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1661
 *     cdef object v_rowexpr = create(data.rowexpr, offset_to_index) if data.rowexpr is not NULL else None
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->coltypes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1661, __pyx_L1_error)
  __pyx_v_v_coltypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1662
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 *     cdef tuple v_colexprs = _pg_list_to_tuple(data.colexprs, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->coltypmods, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1662, __pyx_L1_error)
  __pyx_v_v_coltypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1663
 *     cdef tuple v_coltypes = _pg_list_to_tuple(data.coltypes, offset_to_index)
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_colexprs = _pg_list_to_tuple(data.colexprs, offset_to_index)
 *     cdef tuple v_coldefexprs = _pg_list_to_tuple(data.coldefexprs, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colcollations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1663, __pyx_L1_error)
  __pyx_v_v_colcollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1664
 *     cdef tuple v_coltypmods = _pg_list_to_tuple(data.coltypmods, offset_to_index)
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 *     cdef tuple v_colexprs = _pg_list_to_tuple(data.colexprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_coldefexprs = _pg_list_to_tuple(data.coldefexprs, offset_to_index)
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colexprs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1664, __pyx_L1_error)
  __pyx_v_v_colexprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1665
 *     cdef tuple v_colcollations = _pg_list_to_tuple(data.colcollations, offset_to_index)
 *     cdef tuple v_colexprs = _pg_list_to_tuple(data.colexprs, offset_to_index)
 *     cdef tuple v_coldefexprs = _pg_list_to_tuple(data.coldefexprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)
 *     cdef object v_ordinalitycol = data.ordinalitycol
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->coldefexprs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1665, __pyx_L1_error)
  __pyx_v_v_coldefexprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1666
 *     cdef tuple v_colexprs = _pg_list_to_tuple(data.colexprs, offset_to_index)
 *     cdef tuple v_coldefexprs = _pg_list_to_tuple(data.coldefexprs, offset_to_index)
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)             # <<<<<<<<<<<<<<
 *     cdef object v_ordinalitycol = data.ordinalitycol
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->notnulls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(0, 1666, __pyx_L1_error)
  __pyx_v_v_notnulls = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1667
 *     cdef tuple v_coldefexprs = _pg_list_to_tuple(data.coldefexprs, offset_to_index)
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)
 *     cdef object v_ordinalitycol = data.ordinalitycol             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TableFunc(v_ns_uris, v_ns_names, v_docexpr, v_rowexpr, v_colnames, v_coltypes, v_coltypmods, v_colcollations, v_colexprs, v_coldefexprs, v_notnulls, v_ordinalitycol, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->ordinalitycol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ordinalitycol = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1668
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)
 *     cdef object v_ordinalitycol = data.ordinalitycol
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.TableFunc(v_ns_uris, v_ns_names, v_docexpr, v_rowexpr, v_colnames, v_coltypes, v_coltypmods, v_colcollations, v_colexprs, v_coldefexprs, v_notnulls, v_ordinalitycol, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1669
 *     cdef object v_ordinalitycol = data.ordinalitycol
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TableFunc(v_ns_uris, v_ns_names, v_docexpr, v_rowexpr, v_colnames, v_coltypes, v_coltypmods, v_colcollations, v_colexprs, v_coldefexprs, v_notnulls, v_ordinalitycol, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TableFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[14] = {__pyx_t_3, __pyx_v_v_ns_uris, __pyx_v_v_ns_names, __pyx_v_v_docexpr, __pyx_v_v_rowexpr, __pyx_v_v_colnames, __pyx_v_v_coltypes, __pyx_v_v_coltypmods, __pyx_v_v_colcollations, __pyx_v_v_colexprs, __pyx_v_v_coldefexprs, __pyx_v_v_notnulls, __pyx_v_v_ordinalitycol, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 13+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __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;

  /* "pglast/ast.pyx":1655
 * 
 * 
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_ns_uris = _pg_list_to_tuple(data.ns_uris, offset_to_index)
 *     cdef tuple v_ns_names = _pg_list_to_tuple(data.ns_names, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_TableFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_ns_uris);
  __Pyx_XDECREF(__pyx_v_v_ns_names);
  __Pyx_XDECREF(__pyx_v_v_docexpr);
  __Pyx_XDECREF(__pyx_v_v_rowexpr);
  __Pyx_XDECREF(__pyx_v_v_colnames);
  __Pyx_XDECREF(__pyx_v_v_coltypes);
  __Pyx_XDECREF(__pyx_v_v_coltypmods);
  __Pyx_XDECREF(__pyx_v_v_colcollations);
  __Pyx_XDECREF(__pyx_v_v_colexprs);
  __Pyx_XDECREF(__pyx_v_v_coldefexprs);
  __Pyx_XDECREF(__pyx_v_v_notnulls);
  __Pyx_XDECREF(__pyx_v_v_ordinalitycol);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1672
 * 
 * 
 * cdef create_IntoClause(structs.IntoClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rel = create(data.rel, offset_to_index) if data.rel is not NULL else None
 *     cdef tuple v_colNames = _pg_list_to_tuple(data.colNames, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_IntoClause(IntoClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_rel = 0;
  PyObject *__pyx_v_v_colNames = 0;
  PyObject *__pyx_v_v_accessMethod = 0;
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_onCommit = 0;
  PyObject *__pyx_v_v_tableSpaceName = 0;
  PyObject *__pyx_v_v_viewQuery = 0;
  PyObject *__pyx_v_v_skipData = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_IntoClause", 0);

  /* "pglast/ast.pyx":1673
 * 
 * cdef create_IntoClause(structs.IntoClause* data, offset_to_index):
 *     cdef object v_rel = create(data.rel, offset_to_index) if data.rel is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_colNames = _pg_list_to_tuple(data.colNames, offset_to_index)
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 */
  if ((__pyx_v_data->rel != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rel, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rel = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1674
 * cdef create_IntoClause(structs.IntoClause* data, offset_to_index):
 *     cdef object v_rel = create(data.rel, offset_to_index) if data.rel is not NULL else None
 *     cdef tuple v_colNames = _pg_list_to_tuple(data.colNames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colNames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1674, __pyx_L1_error)
  __pyx_v_v_colNames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1675
 *     cdef object v_rel = create(data.rel, offset_to_index) if data.rel is not NULL else None
 *     cdef tuple v_colNames = _pg_list_to_tuple(data.colNames, offset_to_index)
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_onCommit = getattr(enums, 'OnCommitAction')(data.onCommit)
 */
  if ((__pyx_v_data->accessMethod != NULL)) {
    __pyx_t_3 = __pyx_v_data->accessMethod;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_accessMethod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1676
 *     cdef tuple v_colNames = _pg_list_to_tuple(data.colNames, offset_to_index)
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_onCommit = getattr(enums, 'OnCommitAction')(data.onCommit)
 *     cdef object v_tableSpaceName = data.tableSpaceName.decode("utf-8") if data.tableSpaceName is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->options, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1676, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1677
 *     cdef object v_accessMethod = data.accessMethod.decode("utf-8") if data.accessMethod is not NULL else None
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_onCommit = getattr(enums, 'OnCommitAction')(data.onCommit)             # <<<<<<<<<<<<<<
 *     cdef object v_tableSpaceName = data.tableSpaceName.decode("utf-8") if data.tableSpaceName is not NULL else None
 *     cdef object v_viewQuery = create(data.viewQuery, offset_to_index) if data.viewQuery is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_OnCommitAction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_OnCommitAction(__pyx_v_data->onCommit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_onCommit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1678
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef object v_onCommit = getattr(enums, 'OnCommitAction')(data.onCommit)
 *     cdef object v_tableSpaceName = data.tableSpaceName.decode("utf-8") if data.tableSpaceName is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_viewQuery = create(data.viewQuery, offset_to_index) if data.viewQuery is not NULL else None
 *     cdef object v_skipData = bool(data.skipData)
 */
  if ((__pyx_v_data->tableSpaceName != NULL)) {
    __pyx_t_7 = __pyx_v_data->tableSpaceName;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tableSpaceName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1679
 *     cdef object v_onCommit = getattr(enums, 'OnCommitAction')(data.onCommit)
 *     cdef object v_tableSpaceName = data.tableSpaceName.decode("utf-8") if data.tableSpaceName is not NULL else None
 *     cdef object v_viewQuery = create(data.viewQuery, offset_to_index) if data.viewQuery is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_skipData = bool(data.skipData)
 *     return ast.IntoClause(v_rel, v_colNames, v_accessMethod, v_options, v_onCommit, v_tableSpaceName, v_viewQuery, v_skipData)
 */
  if ((__pyx_v_data->viewQuery != NULL)) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->viewQuery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_viewQuery = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1680
 *     cdef object v_tableSpaceName = data.tableSpaceName.decode("utf-8") if data.tableSpaceName is not NULL else None
 *     cdef object v_viewQuery = create(data.viewQuery, offset_to_index) if data.viewQuery is not NULL else None
 *     cdef object v_skipData = bool(data.skipData)             # <<<<<<<<<<<<<<
 *     return ast.IntoClause(v_rel, v_colNames, v_accessMethod, v_options, v_onCommit, v_tableSpaceName, v_viewQuery, v_skipData)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->skipData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_8))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skipData = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1681
 *     cdef object v_viewQuery = create(data.viewQuery, offset_to_index) if data.viewQuery is not NULL else None
 *     cdef object v_skipData = bool(data.skipData)
 *     return ast.IntoClause(v_rel, v_colNames, v_accessMethod, v_options, v_onCommit, v_tableSpaceName, v_viewQuery, v_skipData)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_IntoClause); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_4, __pyx_v_v_rel, __pyx_v_v_colNames, __pyx_v_v_accessMethod, __pyx_v_v_options, __pyx_v_v_onCommit, __pyx_v_v_tableSpaceName, __pyx_v_v_viewQuery, __pyx_v_v_skipData};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 8+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __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;

  /* "pglast/ast.pyx":1672
 * 
 * 
 * cdef create_IntoClause(structs.IntoClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rel = create(data.rel, offset_to_index) if data.rel is not NULL else None
 *     cdef tuple v_colNames = _pg_list_to_tuple(data.colNames, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_IntoClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_rel);
  __Pyx_XDECREF(__pyx_v_v_colNames);
  __Pyx_XDECREF(__pyx_v_v_accessMethod);
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_onCommit);
  __Pyx_XDECREF(__pyx_v_v_tableSpaceName);
  __Pyx_XDECREF(__pyx_v_v_viewQuery);
  __Pyx_XDECREF(__pyx_v_v_skipData);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1684
 * 
 * 
 * cdef create_Var(structs.Var* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_varno = data.varno
 *     cdef object v_varattno = data.varattno
 */

static PyObject *__pyx_f_6pglast_6parser_create_Var(Var *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_varno = 0;
  PyObject *__pyx_v_v_varattno = 0;
  PyObject *__pyx_v_v_vartypmod = 0;
  PyObject *__pyx_v_v_varlevelsup = 0;
  PyObject *__pyx_v_v_varnosyn = 0;
  PyObject *__pyx_v_v_varattnosyn = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Var", 0);

  /* "pglast/ast.pyx":1685
 * 
 * cdef create_Var(structs.Var* data, offset_to_index):
 *     cdef object v_varno = data.varno             # <<<<<<<<<<<<<<
 *     cdef object v_varattno = data.varattno
 *     cdef object v_vartypmod = data.vartypmod
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->varno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1686
 * cdef create_Var(structs.Var* data, offset_to_index):
 *     cdef object v_varno = data.varno
 *     cdef object v_varattno = data.varattno             # <<<<<<<<<<<<<<
 *     cdef object v_vartypmod = data.vartypmod
 *     cdef object v_varlevelsup = data.varlevelsup
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->varattno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varattno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1687
 *     cdef object v_varno = data.varno
 *     cdef object v_varattno = data.varattno
 *     cdef object v_vartypmod = data.vartypmod             # <<<<<<<<<<<<<<
 *     cdef object v_varlevelsup = data.varlevelsup
 *     cdef object v_varnosyn = data.varnosyn
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->vartypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_vartypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1688
 *     cdef object v_varattno = data.varattno
 *     cdef object v_vartypmod = data.vartypmod
 *     cdef object v_varlevelsup = data.varlevelsup             # <<<<<<<<<<<<<<
 *     cdef object v_varnosyn = data.varnosyn
 *     cdef object v_varattnosyn = data.varattnosyn
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->varlevelsup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varlevelsup = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1689
 *     cdef object v_vartypmod = data.vartypmod
 *     cdef object v_varlevelsup = data.varlevelsup
 *     cdef object v_varnosyn = data.varnosyn             # <<<<<<<<<<<<<<
 *     cdef object v_varattnosyn = data.varattnosyn
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->varnosyn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varnosyn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1690
 *     cdef object v_varlevelsup = data.varlevelsup
 *     cdef object v_varnosyn = data.varnosyn
 *     cdef object v_varattnosyn = data.varattnosyn             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Var(v_varno, v_varattno, v_vartypmod, v_varlevelsup, v_varnosyn, v_varattnosyn, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->varattnosyn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varattnosyn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1691
 *     cdef object v_varnosyn = data.varnosyn
 *     cdef object v_varattnosyn = data.varattnosyn
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.Var(v_varno, v_varattno, v_vartypmod, v_varlevelsup, v_varnosyn, v_varattnosyn, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1692
 *     cdef object v_varattnosyn = data.varattnosyn
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Var(v_varno, v_varattno, v_vartypmod, v_varlevelsup, v_varnosyn, v_varattnosyn, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_varno, __pyx_v_v_varattno, __pyx_v_v_vartypmod, __pyx_v_v_varlevelsup, __pyx_v_v_varnosyn, __pyx_v_v_varattnosyn, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __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;

  /* "pglast/ast.pyx":1684
 * 
 * 
 * cdef create_Var(structs.Var* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_varno = data.varno
 *     cdef object v_varattno = data.varattno
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_Var", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_varno);
  __Pyx_XDECREF(__pyx_v_v_varattno);
  __Pyx_XDECREF(__pyx_v_v_vartypmod);
  __Pyx_XDECREF(__pyx_v_v_varlevelsup);
  __Pyx_XDECREF(__pyx_v_v_varnosyn);
  __Pyx_XDECREF(__pyx_v_v_varattnosyn);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1695
 * 
 * 
 * cdef create_Param(structs.Param* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_paramkind = getattr(enums, 'ParamKind')(data.paramkind)
 *     cdef object v_paramid = data.paramid
 */

static PyObject *__pyx_f_6pglast_6parser_create_Param(Param *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_paramkind = 0;
  PyObject *__pyx_v_v_paramid = 0;
  PyObject *__pyx_v_v_paramtypmod = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Param", 0);

  /* "pglast/ast.pyx":1696
 * 
 * cdef create_Param(structs.Param* data, offset_to_index):
 *     cdef object v_paramkind = getattr(enums, 'ParamKind')(data.paramkind)             # <<<<<<<<<<<<<<
 *     cdef object v_paramid = data.paramid
 *     cdef object v_paramtypmod = data.paramtypmod
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_ParamKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_ParamKind(__pyx_v_data->paramkind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_paramkind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1697
 * cdef create_Param(structs.Param* data, offset_to_index):
 *     cdef object v_paramkind = getattr(enums, 'ParamKind')(data.paramkind)
 *     cdef object v_paramid = data.paramid             # <<<<<<<<<<<<<<
 *     cdef object v_paramtypmod = data.paramtypmod
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->paramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_paramid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1698
 *     cdef object v_paramkind = getattr(enums, 'ParamKind')(data.paramkind)
 *     cdef object v_paramid = data.paramid
 *     cdef object v_paramtypmod = data.paramtypmod             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Param(v_paramkind, v_paramid, v_paramtypmod, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->paramtypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_paramtypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1699
 *     cdef object v_paramid = data.paramid
 *     cdef object v_paramtypmod = data.paramtypmod
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.Param(v_paramkind, v_paramid, v_paramtypmod, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1700
 *     cdef object v_paramtypmod = data.paramtypmod
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Param(v_paramkind, v_paramid, v_paramtypmod, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Param); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_paramkind, __pyx_v_v_paramid, __pyx_v_v_paramtypmod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __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;

  /* "pglast/ast.pyx":1695
 * 
 * 
 * cdef create_Param(structs.Param* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_paramkind = getattr(enums, 'ParamKind')(data.paramkind)
 *     cdef object v_paramid = data.paramid
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_Param", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_paramkind);
  __Pyx_XDECREF(__pyx_v_v_paramid);
  __Pyx_XDECREF(__pyx_v_v_paramtypmod);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1703
 * 
 * 
 * cdef create_Aggref(structs.Aggref* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_aggargtypes = _pg_list_to_tuple(data.aggargtypes, offset_to_index)
 *     cdef tuple v_aggdirectargs = _pg_list_to_tuple(data.aggdirectargs, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_Aggref(Aggref *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_aggargtypes = 0;
  PyObject *__pyx_v_v_aggdirectargs = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_aggorder = 0;
  PyObject *__pyx_v_v_aggdistinct = 0;
  PyObject *__pyx_v_v_aggfilter = 0;
  PyObject *__pyx_v_v_aggstar = 0;
  PyObject *__pyx_v_v_aggvariadic = 0;
  PyObject *__pyx_v_v_aggkind = 0;
  PyObject *__pyx_v_v_agglevelsup = 0;
  PyObject *__pyx_v_v_aggsplit = 0;
  PyObject *__pyx_v_v_aggno = 0;
  PyObject *__pyx_v_v_aggtransno = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Aggref", 0);

  /* "pglast/ast.pyx":1704
 * 
 * cdef create_Aggref(structs.Aggref* data, offset_to_index):
 *     cdef tuple v_aggargtypes = _pg_list_to_tuple(data.aggargtypes, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_aggdirectargs = _pg_list_to_tuple(data.aggdirectargs, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->aggargtypes, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1704, __pyx_L1_error)
  __pyx_v_v_aggargtypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1705
 * cdef create_Aggref(structs.Aggref* data, offset_to_index):
 *     cdef tuple v_aggargtypes = _pg_list_to_tuple(data.aggargtypes, offset_to_index)
 *     cdef tuple v_aggdirectargs = _pg_list_to_tuple(data.aggdirectargs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_aggorder = _pg_list_to_tuple(data.aggorder, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->aggdirectargs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1705, __pyx_L1_error)
  __pyx_v_v_aggdirectargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1706
 *     cdef tuple v_aggargtypes = _pg_list_to_tuple(data.aggargtypes, offset_to_index)
 *     cdef tuple v_aggdirectargs = _pg_list_to_tuple(data.aggdirectargs, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_aggorder = _pg_list_to_tuple(data.aggorder, offset_to_index)
 *     cdef tuple v_aggdistinct = _pg_list_to_tuple(data.aggdistinct, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1706, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1707
 *     cdef tuple v_aggdirectargs = _pg_list_to_tuple(data.aggdirectargs, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_aggorder = _pg_list_to_tuple(data.aggorder, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_aggdistinct = _pg_list_to_tuple(data.aggdistinct, offset_to_index)
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->aggorder, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1707, __pyx_L1_error)
  __pyx_v_v_aggorder = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1708
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_aggorder = _pg_list_to_tuple(data.aggorder, offset_to_index)
 *     cdef tuple v_aggdistinct = _pg_list_to_tuple(data.aggdistinct, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 *     cdef object v_aggstar = bool(data.aggstar)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->aggdistinct, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1708, __pyx_L1_error)
  __pyx_v_v_aggdistinct = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1709
 *     cdef tuple v_aggorder = _pg_list_to_tuple(data.aggorder, offset_to_index)
 *     cdef tuple v_aggdistinct = _pg_list_to_tuple(data.aggdistinct, offset_to_index)
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_aggstar = bool(data.aggstar)
 *     cdef object v_aggvariadic = bool(data.aggvariadic)
 */
  if ((__pyx_v_data->aggfilter != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->aggfilter, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_aggfilter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1710
 *     cdef tuple v_aggdistinct = _pg_list_to_tuple(data.aggdistinct, offset_to_index)
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 *     cdef object v_aggstar = bool(data.aggstar)             # <<<<<<<<<<<<<<
 *     cdef object v_aggvariadic = bool(data.aggvariadic)
 *     cdef object v_aggkind = chr(data.aggkind)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->aggstar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_aggstar = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1711
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 *     cdef object v_aggstar = bool(data.aggstar)
 *     cdef object v_aggvariadic = bool(data.aggvariadic)             # <<<<<<<<<<<<<<
 *     cdef object v_aggkind = chr(data.aggkind)
 *     cdef object v_agglevelsup = data.agglevelsup
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->aggvariadic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_aggvariadic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1712
 *     cdef object v_aggstar = bool(data.aggstar)
 *     cdef object v_aggvariadic = bool(data.aggvariadic)
 *     cdef object v_aggkind = chr(data.aggkind)             # <<<<<<<<<<<<<<
 *     cdef object v_agglevelsup = data.agglevelsup
 *     cdef object v_aggsplit = getattr(enums, 'AggSplit')(data.aggsplit)
 */
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_data->aggkind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_v_aggkind = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":1713
 *     cdef object v_aggvariadic = bool(data.aggvariadic)
 *     cdef object v_aggkind = chr(data.aggkind)
 *     cdef object v_agglevelsup = data.agglevelsup             # <<<<<<<<<<<<<<
 *     cdef object v_aggsplit = getattr(enums, 'AggSplit')(data.aggsplit)
 *     cdef object v_aggno = data.aggno
 */
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->agglevelsup); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_agglevelsup = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":1714
 *     cdef object v_aggkind = chr(data.aggkind)
 *     cdef object v_agglevelsup = data.agglevelsup
 *     cdef object v_aggsplit = getattr(enums, 'AggSplit')(data.aggsplit)             # <<<<<<<<<<<<<<
 *     cdef object v_aggno = data.aggno
 *     cdef object v_aggtransno = data.aggtransno
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_enums); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_1, __pyx_n_u_AggSplit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_AggSplit(__pyx_v_data->aggsplit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_aggsplit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":1715
 *     cdef object v_agglevelsup = data.agglevelsup
 *     cdef object v_aggsplit = getattr(enums, 'AggSplit')(data.aggsplit)
 *     cdef object v_aggno = data.aggno             # <<<<<<<<<<<<<<
 *     cdef object v_aggtransno = data.aggtransno
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->aggno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_aggno = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":1716
 *     cdef object v_aggsplit = getattr(enums, 'AggSplit')(data.aggsplit)
 *     cdef object v_aggno = data.aggno
 *     cdef object v_aggtransno = data.aggtransno             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Aggref(v_aggargtypes, v_aggdirectargs, v_args, v_aggorder, v_aggdistinct, v_aggfilter, v_aggstar, v_aggvariadic, v_aggkind, v_agglevelsup, v_aggsplit, v_aggno, v_aggtransno, v_location)
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->aggtransno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_v_aggtransno = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":1717
 *     cdef object v_aggno = data.aggno
 *     cdef object v_aggtransno = data.aggtransno
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.Aggref(v_aggargtypes, v_aggdirectargs, v_args, v_aggorder, v_aggdistinct, v_aggfilter, v_aggstar, v_aggvariadic, v_aggkind, v_agglevelsup, v_aggsplit, v_aggno, v_aggtransno, v_location)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_1 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_v_location = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/ast.pyx":1718
 *     cdef object v_aggtransno = data.aggtransno
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Aggref(v_aggargtypes, v_aggdirectargs, v_args, v_aggorder, v_aggdistinct, v_aggfilter, v_aggstar, v_aggvariadic, v_aggkind, v_agglevelsup, v_aggsplit, v_aggno, v_aggtransno, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Aggref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[15] = {__pyx_t_1, __pyx_v_v_aggargtypes, __pyx_v_v_aggdirectargs, __pyx_v_v_args, __pyx_v_v_aggorder, __pyx_v_v_aggdistinct, __pyx_v_v_aggfilter, __pyx_v_v_aggstar, __pyx_v_v_aggvariadic, __pyx_v_v_aggkind, __pyx_v_v_agglevelsup, __pyx_v_v_aggsplit, __pyx_v_v_aggno, __pyx_v_v_aggtransno, __pyx_v_v_location};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 14+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1703
 * 
 * 
 * cdef create_Aggref(structs.Aggref* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_aggargtypes = _pg_list_to_tuple(data.aggargtypes, offset_to_index)
 *     cdef tuple v_aggdirectargs = _pg_list_to_tuple(data.aggdirectargs, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_Aggref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_aggargtypes);
  __Pyx_XDECREF(__pyx_v_v_aggdirectargs);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_aggorder);
  __Pyx_XDECREF(__pyx_v_v_aggdistinct);
  __Pyx_XDECREF(__pyx_v_v_aggfilter);
  __Pyx_XDECREF(__pyx_v_v_aggstar);
  __Pyx_XDECREF(__pyx_v_v_aggvariadic);
  __Pyx_XDECREF(__pyx_v_v_aggkind);
  __Pyx_XDECREF(__pyx_v_v_agglevelsup);
  __Pyx_XDECREF(__pyx_v_v_aggsplit);
  __Pyx_XDECREF(__pyx_v_v_aggno);
  __Pyx_XDECREF(__pyx_v_v_aggtransno);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1721
 * 
 * 
 * cdef create_GroupingFunc(structs.GroupingFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_refs = _pg_list_to_tuple(data.refs, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_GroupingFunc(GroupingFunc *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_refs = 0;
  PyObject *__pyx_v_v_cols = 0;
  PyObject *__pyx_v_v_agglevelsup = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_GroupingFunc", 0);

  /* "pglast/ast.pyx":1722
 * 
 * cdef create_GroupingFunc(structs.GroupingFunc* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_refs = _pg_list_to_tuple(data.refs, offset_to_index)
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1722, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1723
 * cdef create_GroupingFunc(structs.GroupingFunc* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_refs = _pg_list_to_tuple(data.refs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     cdef object v_agglevelsup = data.agglevelsup
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->refs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1723, __pyx_L1_error)
  __pyx_v_v_refs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1724
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_refs = _pg_list_to_tuple(data.refs, offset_to_index)
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_agglevelsup = data.agglevelsup
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->cols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1724, __pyx_L1_error)
  __pyx_v_v_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1725
 *     cdef tuple v_refs = _pg_list_to_tuple(data.refs, offset_to_index)
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     cdef object v_agglevelsup = data.agglevelsup             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.GroupingFunc(v_args, v_refs, v_cols, v_agglevelsup, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->agglevelsup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agglevelsup = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1726
 *     cdef tuple v_cols = _pg_list_to_tuple(data.cols, offset_to_index)
 *     cdef object v_agglevelsup = data.agglevelsup
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.GroupingFunc(v_args, v_refs, v_cols, v_agglevelsup, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1727
 *     cdef object v_agglevelsup = data.agglevelsup
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.GroupingFunc(v_args, v_refs, v_cols, v_agglevelsup, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GroupingFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_args, __pyx_v_v_refs, __pyx_v_v_cols, __pyx_v_v_agglevelsup, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __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;

  /* "pglast/ast.pyx":1721
 * 
 * 
 * cdef create_GroupingFunc(structs.GroupingFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef tuple v_refs = _pg_list_to_tuple(data.refs, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_GroupingFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_refs);
  __Pyx_XDECREF(__pyx_v_v_cols);
  __Pyx_XDECREF(__pyx_v_v_agglevelsup);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1730
 * 
 * 
 * cdef create_WindowFunc(structs.WindowFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_WindowFunc(WindowFunc *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_aggfilter = 0;
  PyObject *__pyx_v_v_winref = 0;
  PyObject *__pyx_v_v_winstar = 0;
  PyObject *__pyx_v_v_winagg = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WindowFunc", 0);

  /* "pglast/ast.pyx":1731
 * 
 * cdef create_WindowFunc(structs.WindowFunc* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 *     cdef object v_winref = data.winref
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1731, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1732
 * cdef create_WindowFunc(structs.WindowFunc* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_winref = data.winref
 *     cdef object v_winstar = bool(data.winstar)
 */
  if ((__pyx_v_data->aggfilter != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->aggfilter, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_aggfilter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1733
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 *     cdef object v_winref = data.winref             # <<<<<<<<<<<<<<
 *     cdef object v_winstar = bool(data.winstar)
 *     cdef object v_winagg = bool(data.winagg)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->winref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1734
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 *     cdef object v_winref = data.winref
 *     cdef object v_winstar = bool(data.winstar)             # <<<<<<<<<<<<<<
 *     cdef object v_winagg = bool(data.winagg)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->winstar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winstar = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1735
 *     cdef object v_winref = data.winref
 *     cdef object v_winstar = bool(data.winstar)
 *     cdef object v_winagg = bool(data.winagg)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.WindowFunc(v_args, v_aggfilter, v_winref, v_winstar, v_winagg, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->winagg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winagg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1736
 *     cdef object v_winstar = bool(data.winstar)
 *     cdef object v_winagg = bool(data.winagg)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.WindowFunc(v_args, v_aggfilter, v_winref, v_winstar, v_winagg, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1737
 *     cdef object v_winagg = bool(data.winagg)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.WindowFunc(v_args, v_aggfilter, v_winref, v_winstar, v_winagg, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_WindowFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_args, __pyx_v_v_aggfilter, __pyx_v_v_winref, __pyx_v_v_winstar, __pyx_v_v_winagg, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __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;

  /* "pglast/ast.pyx":1730
 * 
 * 
 * cdef create_WindowFunc(structs.WindowFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_WindowFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_aggfilter);
  __Pyx_XDECREF(__pyx_v_v_winref);
  __Pyx_XDECREF(__pyx_v_v_winstar);
  __Pyx_XDECREF(__pyx_v_v_winagg);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1740
 * 
 * 
 * cdef create_SubscriptingRef(structs.SubscriptingRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_reftypmod = data.reftypmod
 *     cdef tuple v_refupperindexpr = _pg_list_to_tuple(data.refupperindexpr, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_SubscriptingRef(SubscriptingRef *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_reftypmod = 0;
  PyObject *__pyx_v_v_refupperindexpr = 0;
  PyObject *__pyx_v_v_reflowerindexpr = 0;
  PyObject *__pyx_v_v_refexpr = 0;
  PyObject *__pyx_v_v_refassgnexpr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SubscriptingRef", 0);

  /* "pglast/ast.pyx":1741
 * 
 * cdef create_SubscriptingRef(structs.SubscriptingRef* data, offset_to_index):
 *     cdef object v_reftypmod = data.reftypmod             # <<<<<<<<<<<<<<
 *     cdef tuple v_refupperindexpr = _pg_list_to_tuple(data.refupperindexpr, offset_to_index)
 *     cdef tuple v_reflowerindexpr = _pg_list_to_tuple(data.reflowerindexpr, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->reftypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_reftypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1742
 * cdef create_SubscriptingRef(structs.SubscriptingRef* data, offset_to_index):
 *     cdef object v_reftypmod = data.reftypmod
 *     cdef tuple v_refupperindexpr = _pg_list_to_tuple(data.refupperindexpr, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_reflowerindexpr = _pg_list_to_tuple(data.reflowerindexpr, offset_to_index)
 *     cdef object v_refexpr = create(data.refexpr, offset_to_index) if data.refexpr is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->refupperindexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1742, __pyx_L1_error)
  __pyx_v_v_refupperindexpr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1743
 *     cdef object v_reftypmod = data.reftypmod
 *     cdef tuple v_refupperindexpr = _pg_list_to_tuple(data.refupperindexpr, offset_to_index)
 *     cdef tuple v_reflowerindexpr = _pg_list_to_tuple(data.reflowerindexpr, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_refexpr = create(data.refexpr, offset_to_index) if data.refexpr is not NULL else None
 *     cdef object v_refassgnexpr = create(data.refassgnexpr, offset_to_index) if data.refassgnexpr is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->reflowerindexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1743, __pyx_L1_error)
  __pyx_v_v_reflowerindexpr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1744
 *     cdef tuple v_refupperindexpr = _pg_list_to_tuple(data.refupperindexpr, offset_to_index)
 *     cdef tuple v_reflowerindexpr = _pg_list_to_tuple(data.reflowerindexpr, offset_to_index)
 *     cdef object v_refexpr = create(data.refexpr, offset_to_index) if data.refexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_refassgnexpr = create(data.refassgnexpr, offset_to_index) if data.refassgnexpr is not NULL else None
 *     return ast.SubscriptingRef(v_reftypmod, v_refupperindexpr, v_reflowerindexpr, v_refexpr, v_refassgnexpr)
 */
  if ((__pyx_v_data->refexpr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->refexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_refexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1745
 *     cdef tuple v_reflowerindexpr = _pg_list_to_tuple(data.reflowerindexpr, offset_to_index)
 *     cdef object v_refexpr = create(data.refexpr, offset_to_index) if data.refexpr is not NULL else None
 *     cdef object v_refassgnexpr = create(data.refassgnexpr, offset_to_index) if data.refassgnexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.SubscriptingRef(v_reftypmod, v_refupperindexpr, v_reflowerindexpr, v_refexpr, v_refassgnexpr)
 * 
 */
  if ((__pyx_v_data->refassgnexpr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->refassgnexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_refassgnexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1746
 *     cdef object v_refexpr = create(data.refexpr, offset_to_index) if data.refexpr is not NULL else None
 *     cdef object v_refassgnexpr = create(data.refassgnexpr, offset_to_index) if data.refassgnexpr is not NULL else None
 *     return ast.SubscriptingRef(v_reftypmod, v_refupperindexpr, v_reflowerindexpr, v_refexpr, v_refassgnexpr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SubscriptingRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_reftypmod, __pyx_v_v_refupperindexpr, __pyx_v_v_reflowerindexpr, __pyx_v_v_refexpr, __pyx_v_v_refassgnexpr};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 5+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __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;

  /* "pglast/ast.pyx":1740
 * 
 * 
 * cdef create_SubscriptingRef(structs.SubscriptingRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_reftypmod = data.reftypmod
 *     cdef tuple v_refupperindexpr = _pg_list_to_tuple(data.refupperindexpr, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_SubscriptingRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_reftypmod);
  __Pyx_XDECREF(__pyx_v_v_refupperindexpr);
  __Pyx_XDECREF(__pyx_v_v_reflowerindexpr);
  __Pyx_XDECREF(__pyx_v_v_refexpr);
  __Pyx_XDECREF(__pyx_v_v_refassgnexpr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1749
 * 
 * 
 * cdef create_FuncExpr(structs.FuncExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_funcretset = bool(data.funcretset)
 *     cdef object v_funcvariadic = bool(data.funcvariadic)
 */

static PyObject *__pyx_f_6pglast_6parser_create_FuncExpr(FuncExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_funcretset = 0;
  PyObject *__pyx_v_v_funcvariadic = 0;
  PyObject *__pyx_v_v_funcformat = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FuncExpr", 0);

  /* "pglast/ast.pyx":1750
 * 
 * cdef create_FuncExpr(structs.FuncExpr* data, offset_to_index):
 *     cdef object v_funcretset = bool(data.funcretset)             # <<<<<<<<<<<<<<
 *     cdef object v_funcvariadic = bool(data.funcvariadic)
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->funcretset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_funcretset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1751
 * cdef create_FuncExpr(structs.FuncExpr* data, offset_to_index):
 *     cdef object v_funcretset = bool(data.funcretset)
 *     cdef object v_funcvariadic = bool(data.funcvariadic)             # <<<<<<<<<<<<<<
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->funcvariadic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_funcvariadic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1752
 *     cdef object v_funcretset = bool(data.funcretset)
 *     cdef object v_funcvariadic = bool(data.funcvariadic)
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->funcformat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_funcformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1753
 *     cdef object v_funcvariadic = bool(data.funcvariadic)
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.FuncExpr(v_funcretset, v_funcvariadic, v_funcformat, v_args, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1753, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1754
 *     cdef object v_funcformat = getattr(enums, 'CoercionForm')(data.funcformat)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.FuncExpr(v_funcretset, v_funcvariadic, v_funcformat, v_args, v_location)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1755
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.FuncExpr(v_funcretset, v_funcvariadic, v_funcformat, v_args, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_FuncExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_funcretset, __pyx_v_v_funcvariadic, __pyx_v_v_funcformat, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 5+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1749
 * 
 * 
 * cdef create_FuncExpr(structs.FuncExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_funcretset = bool(data.funcretset)
 *     cdef object v_funcvariadic = bool(data.funcvariadic)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_FuncExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_funcretset);
  __Pyx_XDECREF(__pyx_v_v_funcvariadic);
  __Pyx_XDECREF(__pyx_v_v_funcformat);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1758
 * 
 * 
 * cdef create_NamedArgExpr(structs.NamedArgExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_NamedArgExpr(NamedArgExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_argnumber = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_NamedArgExpr", 0);

  /* "pglast/ast.pyx":1759
 * 
 * cdef create_NamedArgExpr(structs.NamedArgExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_argnumber = data.argnumber
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1760
 * cdef create_NamedArgExpr(structs.NamedArgExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_argnumber = data.argnumber
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1761
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_argnumber = data.argnumber             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.NamedArgExpr(v_arg, v_name, v_argnumber, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->argnumber); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_argnumber = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1762
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_argnumber = data.argnumber
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.NamedArgExpr(v_arg, v_name, v_argnumber, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1763
 *     cdef object v_argnumber = data.argnumber
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.NamedArgExpr(v_arg, v_name, v_argnumber, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NamedArgExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_name, __pyx_v_v_argnumber, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 4+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1763, __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;

  /* "pglast/ast.pyx":1758
 * 
 * 
 * cdef create_NamedArgExpr(structs.NamedArgExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_NamedArgExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_argnumber);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1766
 * 
 * 
 * cdef create_OpExpr(structs.OpExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_opretset = bool(data.opretset)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_OpExpr(OpExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_opretset = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_OpExpr", 0);

  /* "pglast/ast.pyx":1767
 * 
 * cdef create_OpExpr(structs.OpExpr* data, offset_to_index):
 *     cdef object v_opretset = bool(data.opretset)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->opretset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_opretset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1768
 * cdef create_OpExpr(structs.OpExpr* data, offset_to_index):
 *     cdef object v_opretset = bool(data.opretset)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.OpExpr(v_opretset, v_args, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1768, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1769
 *     cdef object v_opretset = bool(data.opretset)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.OpExpr(v_opretset, v_args, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1770
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.OpExpr(v_opretset, v_args, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_OpExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_opretset, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1770, __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;

  /* "pglast/ast.pyx":1766
 * 
 * 
 * cdef create_OpExpr(structs.OpExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_opretset = bool(data.opretset)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_OpExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_opretset);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1773
 * 
 * 
 * cdef create_ScalarArrayOpExpr(structs.ScalarArrayOpExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_useOr = bool(data.useOr)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ScalarArrayOpExpr(ScalarArrayOpExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_useOr = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ScalarArrayOpExpr", 0);

  /* "pglast/ast.pyx":1774
 * 
 * cdef create_ScalarArrayOpExpr(structs.ScalarArrayOpExpr* data, offset_to_index):
 *     cdef object v_useOr = bool(data.useOr)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->useOr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_useOr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1775
 * cdef create_ScalarArrayOpExpr(structs.ScalarArrayOpExpr* data, offset_to_index):
 *     cdef object v_useOr = bool(data.useOr)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ScalarArrayOpExpr(v_useOr, v_args, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1775, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1776
 *     cdef object v_useOr = bool(data.useOr)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ScalarArrayOpExpr(v_useOr, v_args, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1777
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ScalarArrayOpExpr(v_useOr, v_args, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ScalarArrayOpExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_useOr, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1777, __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;

  /* "pglast/ast.pyx":1773
 * 
 * 
 * cdef create_ScalarArrayOpExpr(structs.ScalarArrayOpExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_useOr = bool(data.useOr)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_ScalarArrayOpExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_useOr);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1780
 * 
 * 
 * cdef create_BoolExpr(structs.BoolExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_boolop = getattr(enums, 'BoolExprType')(data.boolop)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_BoolExpr(BoolExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_boolop = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_BoolExpr", 0);

  /* "pglast/ast.pyx":1781
 * 
 * cdef create_BoolExpr(structs.BoolExpr* data, offset_to_index):
 *     cdef object v_boolop = getattr(enums, 'BoolExprType')(data.boolop)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_BoolExprType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_BoolExprType(__pyx_v_data->boolop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_boolop = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1782
 * cdef create_BoolExpr(structs.BoolExpr* data, offset_to_index):
 *     cdef object v_boolop = getattr(enums, 'BoolExprType')(data.boolop)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.BoolExpr(v_boolop, v_args, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1782, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1783
 *     cdef object v_boolop = getattr(enums, 'BoolExprType')(data.boolop)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.BoolExpr(v_boolop, v_args, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1784
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.BoolExpr(v_boolop, v_args, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_BoolExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_boolop, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __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;

  /* "pglast/ast.pyx":1780
 * 
 * 
 * cdef create_BoolExpr(structs.BoolExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_boolop = getattr(enums, 'BoolExprType')(data.boolop)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_BoolExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_boolop);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1787
 * 
 * 
 * cdef create_SubLink(structs.SubLink* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_subLinkId = data.subLinkId
 */

static PyObject *__pyx_f_6pglast_6parser_create_SubLink(SubLink *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_subLinkType = 0;
  PyObject *__pyx_v_v_subLinkId = 0;
  PyObject *__pyx_v_v_testexpr = 0;
  PyObject *__pyx_v_v_operName = 0;
  PyObject *__pyx_v_v_subselect = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SubLink", 0);

  /* "pglast/ast.pyx":1788
 * 
 * cdef create_SubLink(structs.SubLink* data, offset_to_index):
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)             # <<<<<<<<<<<<<<
 *     cdef object v_subLinkId = data.subLinkId
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_SubLinkType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_SubLinkType(__pyx_v_data->subLinkType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_subLinkType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1789
 * cdef create_SubLink(structs.SubLink* data, offset_to_index):
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_subLinkId = data.subLinkId             # <<<<<<<<<<<<<<
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 *     cdef tuple v_operName = _pg_list_to_tuple(data.operName, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->subLinkId); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_subLinkId = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1790
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_subLinkId = data.subLinkId
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_operName = _pg_list_to_tuple(data.operName, offset_to_index)
 *     cdef object v_subselect = create(data.subselect, offset_to_index) if data.subselect is not NULL else None
 */
  if ((__pyx_v_data->testexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->testexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_testexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1791
 *     cdef object v_subLinkId = data.subLinkId
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 *     cdef tuple v_operName = _pg_list_to_tuple(data.operName, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_subselect = create(data.subselect, offset_to_index) if data.subselect is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->operName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1791, __pyx_L1_error)
  __pyx_v_v_operName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1792
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 *     cdef tuple v_operName = _pg_list_to_tuple(data.operName, offset_to_index)
 *     cdef object v_subselect = create(data.subselect, offset_to_index) if data.subselect is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SubLink(v_subLinkType, v_subLinkId, v_testexpr, v_operName, v_subselect, v_location)
 */
  if ((__pyx_v_data->subselect != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->subselect, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_subselect = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1793
 *     cdef tuple v_operName = _pg_list_to_tuple(data.operName, offset_to_index)
 *     cdef object v_subselect = create(data.subselect, offset_to_index) if data.subselect is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.SubLink(v_subLinkType, v_subLinkId, v_testexpr, v_operName, v_subselect, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1794
 *     cdef object v_subselect = create(data.subselect, offset_to_index) if data.subselect is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SubLink(v_subLinkType, v_subLinkId, v_testexpr, v_operName, v_subselect, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SubLink); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_2, __pyx_v_v_subLinkType, __pyx_v_v_subLinkId, __pyx_v_v_testexpr, __pyx_v_v_operName, __pyx_v_v_subselect, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __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;

  /* "pglast/ast.pyx":1787
 * 
 * 
 * cdef create_SubLink(structs.SubLink* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_subLinkId = data.subLinkId
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SubLink", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_subLinkType);
  __Pyx_XDECREF(__pyx_v_v_subLinkId);
  __Pyx_XDECREF(__pyx_v_v_testexpr);
  __Pyx_XDECREF(__pyx_v_v_operName);
  __Pyx_XDECREF(__pyx_v_v_subselect);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1797
 * 
 * 
 * cdef create_SubPlan(structs.SubPlan* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_SubPlan(SubPlan *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_subLinkType = 0;
  PyObject *__pyx_v_v_testexpr = 0;
  PyObject *__pyx_v_v_paramIds = 0;
  PyObject *__pyx_v_v_plan_id = 0;
  PyObject *__pyx_v_v_plan_name = 0;
  PyObject *__pyx_v_v_firstColTypmod = 0;
  PyObject *__pyx_v_v_useHashTable = 0;
  PyObject *__pyx_v_v_unknownEqFalse = 0;
  PyObject *__pyx_v_v_parallel_safe = 0;
  PyObject *__pyx_v_v_setParam = 0;
  PyObject *__pyx_v_v_parParam = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_startup_cost = 0;
  PyObject *__pyx_v_v_per_call_cost = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SubPlan", 0);

  /* "pglast/ast.pyx":1798
 * 
 * cdef create_SubPlan(structs.SubPlan* data, offset_to_index):
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)             # <<<<<<<<<<<<<<
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 *     cdef tuple v_paramIds = _pg_list_to_tuple(data.paramIds, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_SubLinkType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_SubLinkType(__pyx_v_data->subLinkType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_subLinkType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1799
 * cdef create_SubPlan(structs.SubPlan* data, offset_to_index):
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_paramIds = _pg_list_to_tuple(data.paramIds, offset_to_index)
 *     cdef object v_plan_id = data.plan_id
 */
  if ((__pyx_v_data->testexpr != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->testexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_testexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1800
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 *     cdef tuple v_paramIds = _pg_list_to_tuple(data.paramIds, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_plan_id = data.plan_id
 *     cdef object v_plan_name = data.plan_name.decode("utf-8") if data.plan_name is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->paramIds, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1800, __pyx_L1_error)
  __pyx_v_v_paramIds = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1801
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 *     cdef tuple v_paramIds = _pg_list_to_tuple(data.paramIds, offset_to_index)
 *     cdef object v_plan_id = data.plan_id             # <<<<<<<<<<<<<<
 *     cdef object v_plan_name = data.plan_name.decode("utf-8") if data.plan_name is not NULL else None
 *     cdef object v_firstColTypmod = data.firstColTypmod
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->plan_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_plan_id = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1802
 *     cdef tuple v_paramIds = _pg_list_to_tuple(data.paramIds, offset_to_index)
 *     cdef object v_plan_id = data.plan_id
 *     cdef object v_plan_name = data.plan_name.decode("utf-8") if data.plan_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_firstColTypmod = data.firstColTypmod
 *     cdef object v_useHashTable = bool(data.useHashTable)
 */
  if ((__pyx_v_data->plan_name != NULL)) {
    __pyx_t_6 = __pyx_v_data->plan_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_plan_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1803
 *     cdef object v_plan_id = data.plan_id
 *     cdef object v_plan_name = data.plan_name.decode("utf-8") if data.plan_name is not NULL else None
 *     cdef object v_firstColTypmod = data.firstColTypmod             # <<<<<<<<<<<<<<
 *     cdef object v_useHashTable = bool(data.useHashTable)
 *     cdef object v_unknownEqFalse = bool(data.unknownEqFalse)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->firstColTypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_firstColTypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1804
 *     cdef object v_plan_name = data.plan_name.decode("utf-8") if data.plan_name is not NULL else None
 *     cdef object v_firstColTypmod = data.firstColTypmod
 *     cdef object v_useHashTable = bool(data.useHashTable)             # <<<<<<<<<<<<<<
 *     cdef object v_unknownEqFalse = bool(data.unknownEqFalse)
 *     cdef object v_parallel_safe = bool(data.parallel_safe)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->useHashTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_useHashTable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1805
 *     cdef object v_firstColTypmod = data.firstColTypmod
 *     cdef object v_useHashTable = bool(data.useHashTable)
 *     cdef object v_unknownEqFalse = bool(data.unknownEqFalse)             # <<<<<<<<<<<<<<
 *     cdef object v_parallel_safe = bool(data.parallel_safe)
 *     cdef tuple v_setParam = _pg_list_to_tuple(data.setParam, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->unknownEqFalse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unknownEqFalse = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1806
 *     cdef object v_useHashTable = bool(data.useHashTable)
 *     cdef object v_unknownEqFalse = bool(data.unknownEqFalse)
 *     cdef object v_parallel_safe = bool(data.parallel_safe)             # <<<<<<<<<<<<<<
 *     cdef tuple v_setParam = _pg_list_to_tuple(data.setParam, offset_to_index)
 *     cdef tuple v_parParam = _pg_list_to_tuple(data.parParam, offset_to_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->parallel_safe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_parallel_safe = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1807
 *     cdef object v_unknownEqFalse = bool(data.unknownEqFalse)
 *     cdef object v_parallel_safe = bool(data.parallel_safe)
 *     cdef tuple v_setParam = _pg_list_to_tuple(data.setParam, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_parParam = _pg_list_to_tuple(data.parParam, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->setParam, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1807, __pyx_L1_error)
  __pyx_v_v_setParam = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1808
 *     cdef object v_parallel_safe = bool(data.parallel_safe)
 *     cdef tuple v_setParam = _pg_list_to_tuple(data.setParam, offset_to_index)
 *     cdef tuple v_parParam = _pg_list_to_tuple(data.parParam, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_startup_cost = data.startup_cost
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->parParam, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1808, __pyx_L1_error)
  __pyx_v_v_parParam = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1809
 *     cdef tuple v_setParam = _pg_list_to_tuple(data.setParam, offset_to_index)
 *     cdef tuple v_parParam = _pg_list_to_tuple(data.parParam, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_startup_cost = data.startup_cost
 *     cdef object v_per_call_cost = data.per_call_cost
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1809, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1810
 *     cdef tuple v_parParam = _pg_list_to_tuple(data.parParam, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_startup_cost = data.startup_cost             # <<<<<<<<<<<<<<
 *     cdef object v_per_call_cost = data.per_call_cost
 *     return ast.SubPlan(v_subLinkType, v_testexpr, v_paramIds, v_plan_id, v_plan_name, v_firstColTypmod, v_useHashTable, v_unknownEqFalse, v_parallel_safe, v_setParam, v_parParam, v_args, v_startup_cost, v_per_call_cost)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_data->startup_cost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_startup_cost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1811
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_startup_cost = data.startup_cost
 *     cdef object v_per_call_cost = data.per_call_cost             # <<<<<<<<<<<<<<
 *     return ast.SubPlan(v_subLinkType, v_testexpr, v_paramIds, v_plan_id, v_plan_name, v_firstColTypmod, v_useHashTable, v_unknownEqFalse, v_parallel_safe, v_setParam, v_parParam, v_args, v_startup_cost, v_per_call_cost)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_data->per_call_cost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_per_call_cost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1812
 *     cdef object v_startup_cost = data.startup_cost
 *     cdef object v_per_call_cost = data.per_call_cost
 *     return ast.SubPlan(v_subLinkType, v_testexpr, v_paramIds, v_plan_id, v_plan_name, v_firstColTypmod, v_useHashTable, v_unknownEqFalse, v_parallel_safe, v_setParam, v_parParam, v_args, v_startup_cost, v_per_call_cost)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SubPlan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[15] = {__pyx_t_3, __pyx_v_v_subLinkType, __pyx_v_v_testexpr, __pyx_v_v_paramIds, __pyx_v_v_plan_id, __pyx_v_v_plan_name, __pyx_v_v_firstColTypmod, __pyx_v_v_useHashTable, __pyx_v_v_unknownEqFalse, __pyx_v_v_parallel_safe, __pyx_v_v_setParam, __pyx_v_v_parParam, __pyx_v_v_args, __pyx_v_v_startup_cost, __pyx_v_v_per_call_cost};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 14+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1812, __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;

  /* "pglast/ast.pyx":1797
 * 
 * 
 * cdef create_SubPlan(structs.SubPlan* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_subLinkType = getattr(enums, 'SubLinkType')(data.subLinkType)
 *     cdef object v_testexpr = create(data.testexpr, offset_to_index) if data.testexpr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SubPlan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_subLinkType);
  __Pyx_XDECREF(__pyx_v_v_testexpr);
  __Pyx_XDECREF(__pyx_v_v_paramIds);
  __Pyx_XDECREF(__pyx_v_v_plan_id);
  __Pyx_XDECREF(__pyx_v_v_plan_name);
  __Pyx_XDECREF(__pyx_v_v_firstColTypmod);
  __Pyx_XDECREF(__pyx_v_v_useHashTable);
  __Pyx_XDECREF(__pyx_v_v_unknownEqFalse);
  __Pyx_XDECREF(__pyx_v_v_parallel_safe);
  __Pyx_XDECREF(__pyx_v_v_setParam);
  __Pyx_XDECREF(__pyx_v_v_parParam);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_startup_cost);
  __Pyx_XDECREF(__pyx_v_v_per_call_cost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1815
 * 
 * 
 * cdef create_AlternativeSubPlan(structs.AlternativeSubPlan* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_subplans = _pg_list_to_tuple(data.subplans, offset_to_index)
 *     return ast.AlternativeSubPlan(v_subplans)
 */

static PyObject *__pyx_f_6pglast_6parser_create_AlternativeSubPlan(AlternativeSubPlan *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_subplans = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlternativeSubPlan", 0);

  /* "pglast/ast.pyx":1816
 * 
 * cdef create_AlternativeSubPlan(structs.AlternativeSubPlan* data, offset_to_index):
 *     cdef tuple v_subplans = _pg_list_to_tuple(data.subplans, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.AlternativeSubPlan(v_subplans)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->subplans, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1816, __pyx_L1_error)
  __pyx_v_v_subplans = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1817
 * cdef create_AlternativeSubPlan(structs.AlternativeSubPlan* data, offset_to_index):
 *     cdef tuple v_subplans = _pg_list_to_tuple(data.subplans, offset_to_index)
 *     return ast.AlternativeSubPlan(v_subplans)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlternativeSubPlan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_subplans};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __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;

  /* "pglast/ast.pyx":1815
 * 
 * 
 * cdef create_AlternativeSubPlan(structs.AlternativeSubPlan* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_subplans = _pg_list_to_tuple(data.subplans, offset_to_index)
 *     return ast.AlternativeSubPlan(v_subplans)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_AlternativeSubPlan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_subplans);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1820
 * 
 * 
 * cdef create_FieldSelect(structs.FieldSelect* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_fieldnum = data.fieldnum
 */

static PyObject *__pyx_f_6pglast_6parser_create_FieldSelect(FieldSelect *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_fieldnum = 0;
  PyObject *__pyx_v_v_resulttypmod = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FieldSelect", 0);

  /* "pglast/ast.pyx":1821
 * 
 * cdef create_FieldSelect(structs.FieldSelect* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_fieldnum = data.fieldnum
 *     cdef object v_resulttypmod = data.resulttypmod
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1822
 * cdef create_FieldSelect(structs.FieldSelect* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_fieldnum = data.fieldnum             # <<<<<<<<<<<<<<
 *     cdef object v_resulttypmod = data.resulttypmod
 *     return ast.FieldSelect(v_arg, v_fieldnum, v_resulttypmod)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->fieldnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_fieldnum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1823
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_fieldnum = data.fieldnum
 *     cdef object v_resulttypmod = data.resulttypmod             # <<<<<<<<<<<<<<
 *     return ast.FieldSelect(v_arg, v_fieldnum, v_resulttypmod)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1824
 *     cdef object v_fieldnum = data.fieldnum
 *     cdef object v_resulttypmod = data.resulttypmod
 *     return ast.FieldSelect(v_arg, v_fieldnum, v_resulttypmod)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FieldSelect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_fieldnum, __pyx_v_v_resulttypmod};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __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;

  /* "pglast/ast.pyx":1820
 * 
 * 
 * cdef create_FieldSelect(structs.FieldSelect* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_fieldnum = data.fieldnum
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_FieldSelect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_fieldnum);
  __Pyx_XDECREF(__pyx_v_v_resulttypmod);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1827
 * 
 * 
 * cdef create_FieldStore(structs.FieldStore* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_newvals = _pg_list_to_tuple(data.newvals, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_FieldStore(FieldStore *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_newvals = 0;
  PyObject *__pyx_v_v_fieldnums = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FieldStore", 0);

  /* "pglast/ast.pyx":1828
 * 
 * cdef create_FieldStore(structs.FieldStore* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_newvals = _pg_list_to_tuple(data.newvals, offset_to_index)
 *     cdef tuple v_fieldnums = _pg_list_to_tuple(data.fieldnums, offset_to_index)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1829
 * cdef create_FieldStore(structs.FieldStore* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_newvals = _pg_list_to_tuple(data.newvals, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_fieldnums = _pg_list_to_tuple(data.fieldnums, offset_to_index)
 *     return ast.FieldStore(v_arg, v_newvals, v_fieldnums)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->newvals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1829, __pyx_L1_error)
  __pyx_v_v_newvals = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1830
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_newvals = _pg_list_to_tuple(data.newvals, offset_to_index)
 *     cdef tuple v_fieldnums = _pg_list_to_tuple(data.fieldnums, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.FieldStore(v_arg, v_newvals, v_fieldnums)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fieldnums, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1830, __pyx_L1_error)
  __pyx_v_v_fieldnums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1831
 *     cdef tuple v_newvals = _pg_list_to_tuple(data.newvals, offset_to_index)
 *     cdef tuple v_fieldnums = _pg_list_to_tuple(data.fieldnums, offset_to_index)
 *     return ast.FieldStore(v_arg, v_newvals, v_fieldnums)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FieldStore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_newvals, __pyx_v_v_fieldnums};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __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;

  /* "pglast/ast.pyx":1827
 * 
 * 
 * cdef create_FieldStore(structs.FieldStore* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_newvals = _pg_list_to_tuple(data.newvals, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_FieldStore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_newvals);
  __Pyx_XDECREF(__pyx_v_v_fieldnums);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1834
 * 
 * 
 * cdef create_RelabelType(structs.RelabelType* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 */

static PyObject *__pyx_f_6pglast_6parser_create_RelabelType(RelabelType *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_resulttypmod = 0;
  PyObject *__pyx_v_v_relabelformat = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RelabelType", 0);

  /* "pglast/ast.pyx":1835
 * 
 * cdef create_RelabelType(structs.RelabelType* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_relabelformat = getattr(enums, 'CoercionForm')(data.relabelformat)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1836
 * cdef create_RelabelType(structs.RelabelType* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod             # <<<<<<<<<<<<<<
 *     cdef object v_relabelformat = getattr(enums, 'CoercionForm')(data.relabelformat)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1837
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_relabelformat = getattr(enums, 'CoercionForm')(data.relabelformat)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RelabelType(v_arg, v_resulttypmod, v_relabelformat, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->relabelformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_relabelformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1838
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_relabelformat = getattr(enums, 'CoercionForm')(data.relabelformat)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.RelabelType(v_arg, v_resulttypmod, v_relabelformat, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1839
 *     cdef object v_relabelformat = getattr(enums, 'CoercionForm')(data.relabelformat)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RelabelType(v_arg, v_resulttypmod, v_relabelformat, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RelabelType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_resulttypmod, __pyx_v_v_relabelformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __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;

  /* "pglast/ast.pyx":1834
 * 
 * 
 * cdef create_RelabelType(structs.RelabelType* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RelabelType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_resulttypmod);
  __Pyx_XDECREF(__pyx_v_v_relabelformat);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1842
 * 
 * 
 * cdef create_CoerceViaIO(structs.CoerceViaIO* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CoerceViaIO(CoerceViaIO *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_coerceformat = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoerceViaIO", 0);

  /* "pglast/ast.pyx":1843
 * 
 * cdef create_CoerceViaIO(structs.CoerceViaIO* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1844
 * cdef create_CoerceViaIO(structs.CoerceViaIO* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoerceViaIO(v_arg, v_coerceformat, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->coerceformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_coerceformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1845
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CoerceViaIO(v_arg, v_coerceformat, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1846
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoerceViaIO(v_arg, v_coerceformat, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CoerceViaIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_coerceformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __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;

  /* "pglast/ast.pyx":1842
 * 
 * 
 * cdef create_CoerceViaIO(structs.CoerceViaIO* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CoerceViaIO", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_coerceformat);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1849
 * 
 * 
 * cdef create_ArrayCoerceExpr(structs.ArrayCoerceExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_elemexpr = create(data.elemexpr, offset_to_index) if data.elemexpr is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_ArrayCoerceExpr(ArrayCoerceExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_elemexpr = 0;
  PyObject *__pyx_v_v_resulttypmod = 0;
  PyObject *__pyx_v_v_coerceformat = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ArrayCoerceExpr", 0);

  /* "pglast/ast.pyx":1850
 * 
 * cdef create_ArrayCoerceExpr(structs.ArrayCoerceExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_elemexpr = create(data.elemexpr, offset_to_index) if data.elemexpr is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1851
 * cdef create_ArrayCoerceExpr(structs.ArrayCoerceExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_elemexpr = create(data.elemexpr, offset_to_index) if data.elemexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 */
  if ((__pyx_v_data->elemexpr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->elemexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_elemexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1852
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_elemexpr = create(data.elemexpr, offset_to_index) if data.elemexpr is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod             # <<<<<<<<<<<<<<
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1853
 *     cdef object v_elemexpr = create(data.elemexpr, offset_to_index) if data.elemexpr is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ArrayCoerceExpr(v_arg, v_elemexpr, v_resulttypmod, v_coerceformat, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->coerceformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_coerceformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1854
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ArrayCoerceExpr(v_arg, v_elemexpr, v_resulttypmod, v_coerceformat, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1855
 *     cdef object v_coerceformat = getattr(enums, 'CoercionForm')(data.coerceformat)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ArrayCoerceExpr(v_arg, v_elemexpr, v_resulttypmod, v_coerceformat, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ArrayCoerceExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_elemexpr, __pyx_v_v_resulttypmod, __pyx_v_v_coerceformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __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;

  /* "pglast/ast.pyx":1849
 * 
 * 
 * cdef create_ArrayCoerceExpr(structs.ArrayCoerceExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_elemexpr = create(data.elemexpr, offset_to_index) if data.elemexpr is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ArrayCoerceExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_elemexpr);
  __Pyx_XDECREF(__pyx_v_v_resulttypmod);
  __Pyx_XDECREF(__pyx_v_v_coerceformat);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1858
 * 
 * 
 * cdef create_ConvertRowtypeExpr(structs.ConvertRowtypeExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_convertformat = getattr(enums, 'CoercionForm')(data.convertformat)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ConvertRowtypeExpr(ConvertRowtypeExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_convertformat = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ConvertRowtypeExpr", 0);

  /* "pglast/ast.pyx":1859
 * 
 * cdef create_ConvertRowtypeExpr(structs.ConvertRowtypeExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_convertformat = getattr(enums, 'CoercionForm')(data.convertformat)
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1860
 * cdef create_ConvertRowtypeExpr(structs.ConvertRowtypeExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_convertformat = getattr(enums, 'CoercionForm')(data.convertformat)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ConvertRowtypeExpr(v_arg, v_convertformat, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->convertformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_convertformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1861
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_convertformat = getattr(enums, 'CoercionForm')(data.convertformat)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ConvertRowtypeExpr(v_arg, v_convertformat, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1862
 *     cdef object v_convertformat = getattr(enums, 'CoercionForm')(data.convertformat)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ConvertRowtypeExpr(v_arg, v_convertformat, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ConvertRowtypeExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_convertformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1862, __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;

  /* "pglast/ast.pyx":1858
 * 
 * 
 * cdef create_ConvertRowtypeExpr(structs.ConvertRowtypeExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_convertformat = getattr(enums, 'CoercionForm')(data.convertformat)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_ConvertRowtypeExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_convertformat);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1865
 * 
 * 
 * cdef create_CollateExpr(structs.CollateExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CollateExpr(CollateExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CollateExpr", 0);

  /* "pglast/ast.pyx":1866
 * 
 * cdef create_CollateExpr(structs.CollateExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CollateExpr(v_arg, v_location)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1867
 * cdef create_CollateExpr(structs.CollateExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CollateExpr(v_arg, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1868
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CollateExpr(v_arg, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CollateExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_arg, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1868, __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;

  /* "pglast/ast.pyx":1865
 * 
 * 
 * cdef create_CollateExpr(structs.CollateExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CollateExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1871
 * 
 * 
 * cdef create_CaseExpr(structs.CaseExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CaseExpr(CaseExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_defresult = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CaseExpr", 0);

  /* "pglast/ast.pyx":1872
 * 
 * cdef create_CaseExpr(structs.CaseExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_defresult = create(data.defresult, offset_to_index) if data.defresult is not NULL else None
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1873
 * cdef create_CaseExpr(structs.CaseExpr* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_defresult = create(data.defresult, offset_to_index) if data.defresult is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1873, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1874
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_defresult = create(data.defresult, offset_to_index) if data.defresult is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CaseExpr(v_arg, v_args, v_defresult, v_location)
 */
  if ((__pyx_v_data->defresult != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->defresult, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_defresult = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1875
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_defresult = create(data.defresult, offset_to_index) if data.defresult is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CaseExpr(v_arg, v_args, v_defresult, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1876
 *     cdef object v_defresult = create(data.defresult, offset_to_index) if data.defresult is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CaseExpr(v_arg, v_args, v_defresult, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CaseExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_arg, __pyx_v_v_args, __pyx_v_v_defresult, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1876, __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;

  /* "pglast/ast.pyx":1871
 * 
 * 
 * cdef create_CaseExpr(structs.CaseExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CaseExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_defresult);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1879
 * 
 * 
 * cdef create_CaseWhen(structs.CaseWhen* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_result = create(data.result, offset_to_index) if data.result is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CaseWhen(CaseWhen *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_result = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CaseWhen", 0);

  /* "pglast/ast.pyx":1880
 * 
 * cdef create_CaseWhen(structs.CaseWhen* data, offset_to_index):
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_result = create(data.result, offset_to_index) if data.result is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->expr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1881
 * cdef create_CaseWhen(structs.CaseWhen* data, offset_to_index):
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_result = create(data.result, offset_to_index) if data.result is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CaseWhen(v_expr, v_result, v_location)
 */
  if ((__pyx_v_data->result != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->result, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1882
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_result = create(data.result, offset_to_index) if data.result is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CaseWhen(v_expr, v_result, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1883
 *     cdef object v_result = create(data.result, offset_to_index) if data.result is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CaseWhen(v_expr, v_result, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CaseWhen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_expr, __pyx_v_v_result, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1883, __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;

  /* "pglast/ast.pyx":1879
 * 
 * 
 * cdef create_CaseWhen(structs.CaseWhen* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_result = create(data.result, offset_to_index) if data.result is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CaseWhen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_result);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1886
 * 
 * 
 * cdef create_CaseTestExpr(structs.CaseTestExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeMod = data.typeMod
 *     return ast.CaseTestExpr(v_typeMod)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CaseTestExpr(CaseTestExpr *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeMod = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CaseTestExpr", 0);

  /* "pglast/ast.pyx":1887
 * 
 * cdef create_CaseTestExpr(structs.CaseTestExpr* data, offset_to_index):
 *     cdef object v_typeMod = data.typeMod             # <<<<<<<<<<<<<<
 *     return ast.CaseTestExpr(v_typeMod)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->typeMod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typeMod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1888
 * cdef create_CaseTestExpr(structs.CaseTestExpr* data, offset_to_index):
 *     cdef object v_typeMod = data.typeMod
 *     return ast.CaseTestExpr(v_typeMod)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CaseTestExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_typeMod};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1888, __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;

  /* "pglast/ast.pyx":1886
 * 
 * 
 * cdef create_CaseTestExpr(structs.CaseTestExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeMod = data.typeMod
 *     return ast.CaseTestExpr(v_typeMod)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_CaseTestExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeMod);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1891
 * 
 * 
 * cdef create_ArrayExpr(structs.ArrayExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_multidims = bool(data.multidims)
 */

static PyObject *__pyx_f_6pglast_6parser_create_ArrayExpr(ArrayExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_elements = 0;
  PyObject *__pyx_v_v_multidims = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ArrayExpr", 0);

  /* "pglast/ast.pyx":1892
 * 
 * cdef create_ArrayExpr(structs.ArrayExpr* data, offset_to_index):
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_multidims = bool(data.multidims)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->elements, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1892, __pyx_L1_error)
  __pyx_v_v_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1893
 * cdef create_ArrayExpr(structs.ArrayExpr* data, offset_to_index):
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_multidims = bool(data.multidims)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ArrayExpr(v_elements, v_multidims, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->multidims); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_multidims = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1894
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_multidims = bool(data.multidims)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ArrayExpr(v_elements, v_multidims, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1895
 *     cdef object v_multidims = bool(data.multidims)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ArrayExpr(v_elements, v_multidims, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ArrayExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_elements, __pyx_v_v_multidims, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1895, __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;

  /* "pglast/ast.pyx":1891
 * 
 * 
 * cdef create_ArrayExpr(structs.ArrayExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_multidims = bool(data.multidims)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_ArrayExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_elements);
  __Pyx_XDECREF(__pyx_v_v_multidims);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1898
 * 
 * 
 * cdef create_RowExpr(structs.RowExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_row_format = getattr(enums, 'CoercionForm')(data.row_format)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RowExpr(RowExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_row_format = 0;
  PyObject *__pyx_v_v_colnames = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RowExpr", 0);

  /* "pglast/ast.pyx":1899
 * 
 * cdef create_RowExpr(structs.RowExpr* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_row_format = getattr(enums, 'CoercionForm')(data.row_format)
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1899, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1900
 * cdef create_RowExpr(structs.RowExpr* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_row_format = getattr(enums, 'CoercionForm')(data.row_format)             # <<<<<<<<<<<<<<
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->row_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_row_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1901
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_row_format = getattr(enums, 'CoercionForm')(data.row_format)
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RowExpr(v_args, v_row_format, v_colnames, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->colnames, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1901, __pyx_L1_error)
  __pyx_v_v_colnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1902
 *     cdef object v_row_format = getattr(enums, 'CoercionForm')(data.row_format)
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.RowExpr(v_args, v_row_format, v_colnames, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1903
 *     cdef tuple v_colnames = _pg_list_to_tuple(data.colnames, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.RowExpr(v_args, v_row_format, v_colnames, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RowExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_args, __pyx_v_v_row_format, __pyx_v_v_colnames, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __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;

  /* "pglast/ast.pyx":1898
 * 
 * 
 * cdef create_RowExpr(structs.RowExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_row_format = getattr(enums, 'CoercionForm')(data.row_format)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RowExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_row_format);
  __Pyx_XDECREF(__pyx_v_v_colnames);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1906
 * 
 * 
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rctype = getattr(enums, 'RowCompareType')(data.rctype)
 *     cdef tuple v_opnos = _pg_list_to_tuple(data.opnos, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RowCompareExpr(RowCompareExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_rctype = 0;
  PyObject *__pyx_v_v_opnos = 0;
  PyObject *__pyx_v_v_opfamilies = 0;
  PyObject *__pyx_v_v_inputcollids = 0;
  PyObject *__pyx_v_v_largs = 0;
  PyObject *__pyx_v_v_rargs = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RowCompareExpr", 0);

  /* "pglast/ast.pyx":1907
 * 
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):
 *     cdef object v_rctype = getattr(enums, 'RowCompareType')(data.rctype)             # <<<<<<<<<<<<<<
 *     cdef tuple v_opnos = _pg_list_to_tuple(data.opnos, offset_to_index)
 *     cdef tuple v_opfamilies = _pg_list_to_tuple(data.opfamilies, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_RowCompareType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_RowCompareType(__pyx_v_data->rctype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_rctype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1908
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):
 *     cdef object v_rctype = getattr(enums, 'RowCompareType')(data.rctype)
 *     cdef tuple v_opnos = _pg_list_to_tuple(data.opnos, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_opfamilies = _pg_list_to_tuple(data.opfamilies, offset_to_index)
 *     cdef tuple v_inputcollids = _pg_list_to_tuple(data.inputcollids, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opnos, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1908, __pyx_L1_error)
  __pyx_v_v_opnos = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1909
 *     cdef object v_rctype = getattr(enums, 'RowCompareType')(data.rctype)
 *     cdef tuple v_opnos = _pg_list_to_tuple(data.opnos, offset_to_index)
 *     cdef tuple v_opfamilies = _pg_list_to_tuple(data.opfamilies, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_inputcollids = _pg_list_to_tuple(data.inputcollids, offset_to_index)
 *     cdef tuple v_largs = _pg_list_to_tuple(data.largs, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opfamilies, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1909, __pyx_L1_error)
  __pyx_v_v_opfamilies = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1910
 *     cdef tuple v_opnos = _pg_list_to_tuple(data.opnos, offset_to_index)
 *     cdef tuple v_opfamilies = _pg_list_to_tuple(data.opfamilies, offset_to_index)
 *     cdef tuple v_inputcollids = _pg_list_to_tuple(data.inputcollids, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_largs = _pg_list_to_tuple(data.largs, offset_to_index)
 *     cdef tuple v_rargs = _pg_list_to_tuple(data.rargs, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->inputcollids, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1910, __pyx_L1_error)
  __pyx_v_v_inputcollids = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1911
 *     cdef tuple v_opfamilies = _pg_list_to_tuple(data.opfamilies, offset_to_index)
 *     cdef tuple v_inputcollids = _pg_list_to_tuple(data.inputcollids, offset_to_index)
 *     cdef tuple v_largs = _pg_list_to_tuple(data.largs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_rargs = _pg_list_to_tuple(data.rargs, offset_to_index)
 *     return ast.RowCompareExpr(v_rctype, v_opnos, v_opfamilies, v_inputcollids, v_largs, v_rargs)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->largs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1911, __pyx_L1_error)
  __pyx_v_v_largs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1912
 *     cdef tuple v_inputcollids = _pg_list_to_tuple(data.inputcollids, offset_to_index)
 *     cdef tuple v_largs = _pg_list_to_tuple(data.largs, offset_to_index)
 *     cdef tuple v_rargs = _pg_list_to_tuple(data.rargs, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.RowCompareExpr(v_rctype, v_opnos, v_opfamilies, v_inputcollids, v_largs, v_rargs)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->rargs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1912, __pyx_L1_error)
  __pyx_v_v_rargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1913
 *     cdef tuple v_largs = _pg_list_to_tuple(data.largs, offset_to_index)
 *     cdef tuple v_rargs = _pg_list_to_tuple(data.rargs, offset_to_index)
 *     return ast.RowCompareExpr(v_rctype, v_opnos, v_opfamilies, v_inputcollids, v_largs, v_rargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RowCompareExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_rctype, __pyx_v_v_opnos, __pyx_v_v_opfamilies, __pyx_v_v_inputcollids, __pyx_v_v_largs, __pyx_v_v_rargs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __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;

  /* "pglast/ast.pyx":1906
 * 
 * 
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rctype = getattr(enums, 'RowCompareType')(data.rctype)
 *     cdef tuple v_opnos = _pg_list_to_tuple(data.opnos, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_RowCompareExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_rctype);
  __Pyx_XDECREF(__pyx_v_v_opnos);
  __Pyx_XDECREF(__pyx_v_v_opfamilies);
  __Pyx_XDECREF(__pyx_v_v_inputcollids);
  __Pyx_XDECREF(__pyx_v_v_largs);
  __Pyx_XDECREF(__pyx_v_v_rargs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1916
 * 
 * 
 * cdef create_CoalesceExpr(structs.CoalesceExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CoalesceExpr(CoalesceExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoalesceExpr", 0);

  /* "pglast/ast.pyx":1917
 * 
 * cdef create_CoalesceExpr(structs.CoalesceExpr* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoalesceExpr(v_args, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1917, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1918
 * cdef create_CoalesceExpr(structs.CoalesceExpr* data, offset_to_index):
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CoalesceExpr(v_args, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1919
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoalesceExpr(v_args, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CoalesceExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __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;

  /* "pglast/ast.pyx":1916
 * 
 * 
 * cdef create_CoalesceExpr(structs.CoalesceExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CoalesceExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1922
 * 
 * 
 * cdef create_MinMaxExpr(structs.MinMaxExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'MinMaxOp')(data.op)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_MinMaxExpr(MinMaxExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_op = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MinMaxExpr", 0);

  /* "pglast/ast.pyx":1923
 * 
 * cdef create_MinMaxExpr(structs.MinMaxExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'MinMaxOp')(data.op)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_MinMaxOp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_MinMaxOp(__pyx_v_data->op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1924
 * cdef create_MinMaxExpr(structs.MinMaxExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'MinMaxOp')(data.op)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.MinMaxExpr(v_op, v_args, v_location)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1924, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1925
 *     cdef object v_op = getattr(enums, 'MinMaxOp')(data.op)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.MinMaxExpr(v_op, v_args, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1926
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.MinMaxExpr(v_op, v_args, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_MinMaxExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_op, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __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;

  /* "pglast/ast.pyx":1922
 * 
 * 
 * cdef create_MinMaxExpr(structs.MinMaxExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'MinMaxOp')(data.op)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_MinMaxExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_op);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1929
 * 
 * 
 * cdef create_SQLValueFunction(structs.SQLValueFunction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'SQLValueFunctionOp')(data.op)
 *     cdef object v_typmod = data.typmod
 */

static PyObject *__pyx_f_6pglast_6parser_create_SQLValueFunction(SQLValueFunction *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_op = 0;
  PyObject *__pyx_v_v_typmod = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SQLValueFunction", 0);

  /* "pglast/ast.pyx":1930
 * 
 * cdef create_SQLValueFunction(structs.SQLValueFunction* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'SQLValueFunctionOp')(data.op)             # <<<<<<<<<<<<<<
 *     cdef object v_typmod = data.typmod
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_SQLValueFunctionOp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_SQLValueFunctionOp(__pyx_v_data->op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1931
 * cdef create_SQLValueFunction(structs.SQLValueFunction* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'SQLValueFunctionOp')(data.op)
 *     cdef object v_typmod = data.typmod             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SQLValueFunction(v_op, v_typmod, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->typmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1932
 *     cdef object v_op = getattr(enums, 'SQLValueFunctionOp')(data.op)
 *     cdef object v_typmod = data.typmod
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.SQLValueFunction(v_op, v_typmod, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1933
 *     cdef object v_typmod = data.typmod
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SQLValueFunction(v_op, v_typmod, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SQLValueFunction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_op, __pyx_v_v_typmod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __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;

  /* "pglast/ast.pyx":1929
 * 
 * 
 * cdef create_SQLValueFunction(structs.SQLValueFunction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'SQLValueFunctionOp')(data.op)
 *     cdef object v_typmod = data.typmod
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SQLValueFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_op);
  __Pyx_XDECREF(__pyx_v_v_typmod);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1936
 * 
 * 
 * cdef create_XmlExpr(structs.XmlExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'XmlExprOp')(data.op)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_XmlExpr(XmlExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_op = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_named_args = 0;
  PyObject *__pyx_v_v_arg_names = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_xmloption = 0;
  PyObject *__pyx_v_v_typmod = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_XmlExpr", 0);

  /* "pglast/ast.pyx":1937
 * 
 * cdef create_XmlExpr(structs.XmlExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'XmlExprOp')(data.op)             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_named_args = _pg_list_to_tuple(data.named_args, offset_to_index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_XmlExprOp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_XmlExprOp(__pyx_v_data->op); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1938
 * cdef create_XmlExpr(structs.XmlExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'XmlExprOp')(data.op)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_named_args = _pg_list_to_tuple(data.named_args, offset_to_index)
 *     cdef tuple v_arg_names = _pg_list_to_tuple(data.arg_names, offset_to_index)
 */
  if ((__pyx_v_data->name != NULL)) {
    __pyx_t_6 = __pyx_v_data->name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1939
 *     cdef object v_op = getattr(enums, 'XmlExprOp')(data.op)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_named_args = _pg_list_to_tuple(data.named_args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_arg_names = _pg_list_to_tuple(data.arg_names, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->named_args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1939, __pyx_L1_error)
  __pyx_v_v_named_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1940
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef tuple v_named_args = _pg_list_to_tuple(data.named_args, offset_to_index)
 *     cdef tuple v_arg_names = _pg_list_to_tuple(data.arg_names, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->arg_names, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1940, __pyx_L1_error)
  __pyx_v_v_arg_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1941
 *     cdef tuple v_named_args = _pg_list_to_tuple(data.named_args, offset_to_index)
 *     cdef tuple v_arg_names = _pg_list_to_tuple(data.arg_names, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_typmod = data.typmod
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->args, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 1941, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1942
 *     cdef tuple v_arg_names = _pg_list_to_tuple(data.arg_names, offset_to_index)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)             # <<<<<<<<<<<<<<
 *     cdef object v_typmod = data.typmod
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_n_u_XmlOptionType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_XmlOptionType(__pyx_v_data->xmloption); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_xmloption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1943
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_typmod = data.typmod             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.XmlExpr(v_op, v_name, v_named_args, v_arg_names, v_args, v_xmloption, v_typmod, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->typmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1944
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_typmod = data.typmod
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.XmlExpr(v_op, v_name, v_named_args, v_arg_names, v_args, v_xmloption, v_typmod, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1945
 *     cdef object v_typmod = data.typmod
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.XmlExpr(v_op, v_name, v_named_args, v_arg_names, v_args, v_xmloption, v_typmod, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_XmlExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_v_v_op, __pyx_v_v_name, __pyx_v_v_named_args, __pyx_v_v_arg_names, __pyx_v_v_args, __pyx_v_v_xmloption, __pyx_v_v_typmod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 8+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __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;

  /* "pglast/ast.pyx":1936
 * 
 * 
 * cdef create_XmlExpr(structs.XmlExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'XmlExprOp')(data.op)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_XmlExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_op);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_named_args);
  __Pyx_XDECREF(__pyx_v_v_arg_names);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_xmloption);
  __Pyx_XDECREF(__pyx_v_v_typmod);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1948
 * 
 * 
 * cdef create_NullTest(structs.NullTest* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_nulltesttype = getattr(enums, 'NullTestType')(data.nulltesttype)
 */

static PyObject *__pyx_f_6pglast_6parser_create_NullTest(NullTest *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_nulltesttype = 0;
  PyObject *__pyx_v_v_argisrow = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_NullTest", 0);

  /* "pglast/ast.pyx":1949
 * 
 * cdef create_NullTest(structs.NullTest* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_nulltesttype = getattr(enums, 'NullTestType')(data.nulltesttype)
 *     cdef object v_argisrow = bool(data.argisrow)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1950
 * cdef create_NullTest(structs.NullTest* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_nulltesttype = getattr(enums, 'NullTestType')(data.nulltesttype)             # <<<<<<<<<<<<<<
 *     cdef object v_argisrow = bool(data.argisrow)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_NullTestType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_NullTestType(__pyx_v_data->nulltesttype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_nulltesttype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1951
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_nulltesttype = getattr(enums, 'NullTestType')(data.nulltesttype)
 *     cdef object v_argisrow = bool(data.argisrow)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.NullTest(v_arg, v_nulltesttype, v_argisrow, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->argisrow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_argisrow = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1952
 *     cdef object v_nulltesttype = getattr(enums, 'NullTestType')(data.nulltesttype)
 *     cdef object v_argisrow = bool(data.argisrow)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.NullTest(v_arg, v_nulltesttype, v_argisrow, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1953
 *     cdef object v_argisrow = bool(data.argisrow)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.NullTest(v_arg, v_nulltesttype, v_argisrow, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NullTest); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_nulltesttype, __pyx_v_v_argisrow, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __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;

  /* "pglast/ast.pyx":1948
 * 
 * 
 * cdef create_NullTest(structs.NullTest* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_nulltesttype = getattr(enums, 'NullTestType')(data.nulltesttype)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_NullTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_nulltesttype);
  __Pyx_XDECREF(__pyx_v_v_argisrow);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1956
 * 
 * 
 * cdef create_BooleanTest(structs.BooleanTest* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_booltesttype = getattr(enums, 'BoolTestType')(data.booltesttype)
 */

static PyObject *__pyx_f_6pglast_6parser_create_BooleanTest(BooleanTest *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_booltesttype = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_BooleanTest", 0);

  /* "pglast/ast.pyx":1957
 * 
 * cdef create_BooleanTest(structs.BooleanTest* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_booltesttype = getattr(enums, 'BoolTestType')(data.booltesttype)
 *     cdef object v_location = offset_to_index(data.location)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1958
 * cdef create_BooleanTest(structs.BooleanTest* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_booltesttype = getattr(enums, 'BoolTestType')(data.booltesttype)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.BooleanTest(v_arg, v_booltesttype, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_BoolTestType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_BoolTestType(__pyx_v_data->booltesttype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_booltesttype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1959
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_booltesttype = getattr(enums, 'BoolTestType')(data.booltesttype)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.BooleanTest(v_arg, v_booltesttype, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1960
 *     cdef object v_booltesttype = getattr(enums, 'BoolTestType')(data.booltesttype)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.BooleanTest(v_arg, v_booltesttype, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_BooleanTest); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_booltesttype, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __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;

  /* "pglast/ast.pyx":1956
 * 
 * 
 * cdef create_BooleanTest(structs.BooleanTest* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_booltesttype = getattr(enums, 'BoolTestType')(data.booltesttype)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_BooleanTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_booltesttype);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1963
 * 
 * 
 * cdef create_CoerceToDomain(structs.CoerceToDomain* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 */

static PyObject *__pyx_f_6pglast_6parser_create_CoerceToDomain(CoerceToDomain *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_resulttypmod = 0;
  PyObject *__pyx_v_v_coercionformat = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoerceToDomain", 0);

  /* "pglast/ast.pyx":1964
 * 
 * cdef create_CoerceToDomain(structs.CoerceToDomain* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_coercionformat = getattr(enums, 'CoercionForm')(data.coercionformat)
 */
  if ((__pyx_v_data->arg != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1965
 * cdef create_CoerceToDomain(structs.CoerceToDomain* data, offset_to_index):
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod             # <<<<<<<<<<<<<<
 *     cdef object v_coercionformat = getattr(enums, 'CoercionForm')(data.coercionformat)
 *     cdef object v_location = offset_to_index(data.location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1966
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_coercionformat = getattr(enums, 'CoercionForm')(data.coercionformat)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoerceToDomain(v_arg, v_resulttypmod, v_coercionformat, v_location)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_CoercionForm(__pyx_v_data->coercionformat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_coercionformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1967
 *     cdef object v_resulttypmod = data.resulttypmod
 *     cdef object v_coercionformat = getattr(enums, 'CoercionForm')(data.coercionformat)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CoerceToDomain(v_arg, v_resulttypmod, v_coercionformat, v_location)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1968
 *     cdef object v_coercionformat = getattr(enums, 'CoercionForm')(data.coercionformat)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoerceToDomain(v_arg, v_resulttypmod, v_coercionformat, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CoerceToDomain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_arg, __pyx_v_v_resulttypmod, __pyx_v_v_coercionformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __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;

  /* "pglast/ast.pyx":1963
 * 
 * 
 * cdef create_CoerceToDomain(structs.CoerceToDomain* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_resulttypmod = data.resulttypmod
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CoerceToDomain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_resulttypmod);
  __Pyx_XDECREF(__pyx_v_v_coercionformat);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1971
 * 
 * 
 * cdef create_CoerceToDomainValue(structs.CoerceToDomainValue* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_CoerceToDomainValue(CoerceToDomainValue *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeMod = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoerceToDomainValue", 0);

  /* "pglast/ast.pyx":1972
 * 
 * cdef create_CoerceToDomainValue(structs.CoerceToDomainValue* data, offset_to_index):
 *     cdef object v_typeMod = data.typeMod             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoerceToDomainValue(v_typeMod, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->typeMod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typeMod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1973
 * cdef create_CoerceToDomainValue(structs.CoerceToDomainValue* data, offset_to_index):
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.CoerceToDomainValue(v_typeMod, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1974
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.CoerceToDomainValue(v_typeMod, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CoerceToDomainValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_typeMod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __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;

  /* "pglast/ast.pyx":1971
 * 
 * 
 * cdef create_CoerceToDomainValue(structs.CoerceToDomainValue* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CoerceToDomainValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeMod);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1977
 * 
 * 
 * cdef create_SetToDefault(structs.SetToDefault* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)
 */

static PyObject *__pyx_f_6pglast_6parser_create_SetToDefault(SetToDefault *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeMod = 0;
  PyObject *__pyx_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SetToDefault", 0);

  /* "pglast/ast.pyx":1978
 * 
 * cdef create_SetToDefault(structs.SetToDefault* data, offset_to_index):
 *     cdef object v_typeMod = data.typeMod             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SetToDefault(v_typeMod, v_location)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_data->typeMod); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typeMod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1979
 * cdef create_SetToDefault(structs.SetToDefault* data, offset_to_index):
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.SetToDefault(v_typeMod, v_location)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1980
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.SetToDefault(v_typeMod, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SetToDefault); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_typeMod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1980, __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;

  /* "pglast/ast.pyx":1977
 * 
 * 
 * cdef create_SetToDefault(structs.SetToDefault* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeMod = data.typeMod
 *     cdef object v_location = offset_to_index(data.location)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_SetToDefault", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeMod);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1983
 * 
 * 
 * cdef create_CurrentOfExpr(structs.CurrentOfExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_cvarno = data.cvarno
 *     cdef object v_cursor_name = data.cursor_name.decode("utf-8") if data.cursor_name is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_CurrentOfExpr(CurrentOfExpr *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_cvarno = 0;
  PyObject *__pyx_v_v_cursor_name = 0;
  PyObject *__pyx_v_v_cursor_param = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CurrentOfExpr", 0);

  /* "pglast/ast.pyx":1984
 * 
 * cdef create_CurrentOfExpr(structs.CurrentOfExpr* data, offset_to_index):
 *     cdef object v_cvarno = data.cvarno             # <<<<<<<<<<<<<<
 *     cdef object v_cursor_name = data.cursor_name.decode("utf-8") if data.cursor_name is not NULL else None
 *     cdef object v_cursor_param = data.cursor_param
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->cvarno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cvarno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1985
 * cdef create_CurrentOfExpr(structs.CurrentOfExpr* data, offset_to_index):
 *     cdef object v_cvarno = data.cvarno
 *     cdef object v_cursor_name = data.cursor_name.decode("utf-8") if data.cursor_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_cursor_param = data.cursor_param
 *     return ast.CurrentOfExpr(v_cvarno, v_cursor_name, v_cursor_param)
 */
  if ((__pyx_v_data->cursor_name != NULL)) {
    __pyx_t_2 = __pyx_v_data->cursor_name;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cursor_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1986
 *     cdef object v_cvarno = data.cvarno
 *     cdef object v_cursor_name = data.cursor_name.decode("utf-8") if data.cursor_name is not NULL else None
 *     cdef object v_cursor_param = data.cursor_param             # <<<<<<<<<<<<<<
 *     return ast.CurrentOfExpr(v_cvarno, v_cursor_name, v_cursor_param)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->cursor_param); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cursor_param = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1987
 *     cdef object v_cursor_name = data.cursor_name.decode("utf-8") if data.cursor_name is not NULL else None
 *     cdef object v_cursor_param = data.cursor_param
 *     return ast.CurrentOfExpr(v_cvarno, v_cursor_name, v_cursor_param)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CurrentOfExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_cvarno, __pyx_v_v_cursor_name, __pyx_v_v_cursor_param};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1983
 * 
 * 
 * cdef create_CurrentOfExpr(structs.CurrentOfExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_cvarno = data.cvarno
 *     cdef object v_cursor_name = data.cursor_name.decode("utf-8") if data.cursor_name is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_CurrentOfExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_cvarno);
  __Pyx_XDECREF(__pyx_v_v_cursor_name);
  __Pyx_XDECREF(__pyx_v_v_cursor_param);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1990
 * 
 * 
 * cdef create_InferenceElem(structs.InferenceElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     return ast.InferenceElem(v_expr)
 */

static PyObject *__pyx_f_6pglast_6parser_create_InferenceElem(InferenceElem *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InferenceElem", 0);

  /* "pglast/ast.pyx":1991
 * 
 * cdef create_InferenceElem(structs.InferenceElem* data, offset_to_index):
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.InferenceElem(v_expr)
 * 
 */
  if ((__pyx_v_data->expr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1992
 * cdef create_InferenceElem(structs.InferenceElem* data, offset_to_index):
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     return ast.InferenceElem(v_expr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InferenceElem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __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;

  /* "pglast/ast.pyx":1990
 * 
 * 
 * cdef create_InferenceElem(structs.InferenceElem* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     return ast.InferenceElem(v_expr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_InferenceElem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1995
 * 
 * 
 * cdef create_TargetEntry(structs.TargetEntry* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_resno = data.resno
 */

static PyObject *__pyx_f_6pglast_6parser_create_TargetEntry(TargetEntry *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_resno = 0;
  PyObject *__pyx_v_v_resname = 0;
  PyObject *__pyx_v_v_ressortgroupref = 0;
  PyObject *__pyx_v_v_resorigcol = 0;
  PyObject *__pyx_v_v_resjunk = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TargetEntry", 0);

  /* "pglast/ast.pyx":1996
 * 
 * cdef create_TargetEntry(structs.TargetEntry* data, offset_to_index):
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_resno = data.resno
 *     cdef object v_resname = data.resname.decode("utf-8") if data.resname is not NULL else None
 */
  if ((__pyx_v_data->expr != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1997
 * cdef create_TargetEntry(structs.TargetEntry* data, offset_to_index):
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_resno = data.resno             # <<<<<<<<<<<<<<
 *     cdef object v_resname = data.resname.decode("utf-8") if data.resname is not NULL else None
 *     cdef object v_ressortgroupref = data.ressortgroupref
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->resno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1998
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_resno = data.resno
 *     cdef object v_resname = data.resname.decode("utf-8") if data.resname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_ressortgroupref = data.ressortgroupref
 *     cdef object v_resorigcol = data.resorigcol
 */
  if ((__pyx_v_data->resname != NULL)) {
    __pyx_t_3 = __pyx_v_data->resname;
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_resname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1999
 *     cdef object v_resno = data.resno
 *     cdef object v_resname = data.resname.decode("utf-8") if data.resname is not NULL else None
 *     cdef object v_ressortgroupref = data.ressortgroupref             # <<<<<<<<<<<<<<
 *     cdef object v_resorigcol = data.resorigcol
 *     cdef object v_resjunk = bool(data.resjunk)
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_data->ressortgroupref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ressortgroupref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2000
 *     cdef object v_resname = data.resname.decode("utf-8") if data.resname is not NULL else None
 *     cdef object v_ressortgroupref = data.ressortgroupref
 *     cdef object v_resorigcol = data.resorigcol             # <<<<<<<<<<<<<<
 *     cdef object v_resjunk = bool(data.resjunk)
 *     return ast.TargetEntry(v_expr, v_resno, v_resname, v_ressortgroupref, v_resorigcol, v_resjunk)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->resorigcol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resorigcol = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2001
 *     cdef object v_ressortgroupref = data.ressortgroupref
 *     cdef object v_resorigcol = data.resorigcol
 *     cdef object v_resjunk = bool(data.resjunk)             # <<<<<<<<<<<<<<
 *     return ast.TargetEntry(v_expr, v_resno, v_resname, v_ressortgroupref, v_resorigcol, v_resjunk)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->resjunk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resjunk = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2002
 *     cdef object v_resorigcol = data.resorigcol
 *     cdef object v_resjunk = bool(data.resjunk)
 *     return ast.TargetEntry(v_expr, v_resno, v_resname, v_ressortgroupref, v_resorigcol, v_resjunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TargetEntry); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_2, __pyx_v_v_expr, __pyx_v_v_resno, __pyx_v_v_resname, __pyx_v_v_ressortgroupref, __pyx_v_v_resorigcol, __pyx_v_v_resjunk};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1995
 * 
 * 
 * cdef create_TargetEntry(structs.TargetEntry* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_resno = data.resno
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_TargetEntry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_resno);
  __Pyx_XDECREF(__pyx_v_v_resname);
  __Pyx_XDECREF(__pyx_v_v_ressortgroupref);
  __Pyx_XDECREF(__pyx_v_v_resorigcol);
  __Pyx_XDECREF(__pyx_v_v_resjunk);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2005
 * 
 * 
 * cdef create_RangeTblRef(structs.RangeTblRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rtindex = data.rtindex
 *     return ast.RangeTblRef(v_rtindex)
 */

static PyObject *__pyx_f_6pglast_6parser_create_RangeTblRef(RangeTblRef *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_rtindex = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTblRef", 0);

  /* "pglast/ast.pyx":2006
 * 
 * cdef create_RangeTblRef(structs.RangeTblRef* data, offset_to_index):
 *     cdef object v_rtindex = data.rtindex             # <<<<<<<<<<<<<<
 *     return ast.RangeTblRef(v_rtindex)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->rtindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_rtindex = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2007
 * cdef create_RangeTblRef(structs.RangeTblRef* data, offset_to_index):
 *     cdef object v_rtindex = data.rtindex
 *     return ast.RangeTblRef(v_rtindex)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RangeTblRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_rtindex};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2007, __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;

  /* "pglast/ast.pyx":2005
 * 
 * 
 * cdef create_RangeTblRef(structs.RangeTblRef* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_rtindex = data.rtindex
 *     return ast.RangeTblRef(v_rtindex)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_RangeTblRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_rtindex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2010
 * 
 * 
 * cdef create_JoinExpr(structs.JoinExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 *     cdef object v_isNatural = bool(data.isNatural)
 */

static PyObject *__pyx_f_6pglast_6parser_create_JoinExpr(JoinExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_jointype = 0;
  PyObject *__pyx_v_v_isNatural = 0;
  PyObject *__pyx_v_v_larg = 0;
  PyObject *__pyx_v_v_rarg = 0;
  PyObject *__pyx_v_v_usingClause = 0;
  PyObject *__pyx_v_v_join_using_alias = 0;
  PyObject *__pyx_v_v_quals = 0;
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_v_v_rtindex = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JoinExpr", 0);

  /* "pglast/ast.pyx":2011
 * 
 * cdef create_JoinExpr(structs.JoinExpr* data, offset_to_index):
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)             # <<<<<<<<<<<<<<
 *     cdef object v_isNatural = bool(data.isNatural)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_JoinType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_JoinType(__pyx_v_data->jointype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_jointype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2012
 * cdef create_JoinExpr(structs.JoinExpr* data, offset_to_index):
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 *     cdef object v_isNatural = bool(data.isNatural)             # <<<<<<<<<<<<<<
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isNatural); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2012, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isNatural = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2013
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 *     cdef object v_isNatural = bool(data.isNatural)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 */
  if ((__pyx_v_data->larg != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->larg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_larg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2014
 *     cdef object v_isNatural = bool(data.isNatural)
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 */
  if ((__pyx_v_data->rarg != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rarg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_rarg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2015
 *     cdef object v_larg = create(data.larg, offset_to_index) if data.larg is not NULL else None
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->usingClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 2015, __pyx_L1_error)
  __pyx_v_v_usingClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2016
 *     cdef object v_rarg = create(data.rarg, offset_to_index) if data.rarg is not NULL else None
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 */
  if ((__pyx_v_data->join_using_alias != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->join_using_alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_join_using_alias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2017
 *     cdef tuple v_usingClause = _pg_list_to_tuple(data.usingClause, offset_to_index)
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_rtindex = data.rtindex
 */
  if ((__pyx_v_data->quals != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->quals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_quals = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2018
 *     cdef object v_join_using_alias = create(data.join_using_alias, offset_to_index) if data.join_using_alias is not NULL else None
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_rtindex = data.rtindex
 *     return ast.JoinExpr(v_jointype, v_isNatural, v_larg, v_rarg, v_usingClause, v_join_using_alias, v_quals, v_alias, v_rtindex)
 */
  if ((__pyx_v_data->alias != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_alias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2019
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_rtindex = data.rtindex             # <<<<<<<<<<<<<<
 *     return ast.JoinExpr(v_jointype, v_isNatural, v_larg, v_rarg, v_usingClause, v_join_using_alias, v_quals, v_alias, v_rtindex)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->rtindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_rtindex = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2020
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_rtindex = data.rtindex
 *     return ast.JoinExpr(v_jointype, v_isNatural, v_larg, v_rarg, v_usingClause, v_join_using_alias, v_quals, v_alias, v_rtindex)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_JoinExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[10] = {__pyx_t_3, __pyx_v_v_jointype, __pyx_v_v_isNatural, __pyx_v_v_larg, __pyx_v_v_rarg, __pyx_v_v_usingClause, __pyx_v_v_join_using_alias, __pyx_v_v_quals, __pyx_v_v_alias, __pyx_v_v_rtindex};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 9+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2020, __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;

  /* "pglast/ast.pyx":2010
 * 
 * 
 * cdef create_JoinExpr(structs.JoinExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_jointype = getattr(enums, 'JoinType')(data.jointype)
 *     cdef object v_isNatural = bool(data.isNatural)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_JoinExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_jointype);
  __Pyx_XDECREF(__pyx_v_v_isNatural);
  __Pyx_XDECREF(__pyx_v_v_larg);
  __Pyx_XDECREF(__pyx_v_v_rarg);
  __Pyx_XDECREF(__pyx_v_v_usingClause);
  __Pyx_XDECREF(__pyx_v_v_join_using_alias);
  __Pyx_XDECREF(__pyx_v_v_quals);
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XDECREF(__pyx_v_v_rtindex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2023
 * 
 * 
 * cdef create_FromExpr(structs.FromExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_fromlist = _pg_list_to_tuple(data.fromlist, offset_to_index)
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 */

static PyObject *__pyx_f_6pglast_6parser_create_FromExpr(FromExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_fromlist = 0;
  PyObject *__pyx_v_v_quals = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FromExpr", 0);

  /* "pglast/ast.pyx":2024
 * 
 * cdef create_FromExpr(structs.FromExpr* data, offset_to_index):
 *     cdef tuple v_fromlist = _pg_list_to_tuple(data.fromlist, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 *     return ast.FromExpr(v_fromlist, v_quals)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fromlist, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 2024, __pyx_L1_error)
  __pyx_v_v_fromlist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2025
 * cdef create_FromExpr(structs.FromExpr* data, offset_to_index):
 *     cdef tuple v_fromlist = _pg_list_to_tuple(data.fromlist, offset_to_index)
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.FromExpr(v_fromlist, v_quals)
 * 
 */
  if ((__pyx_v_data->quals != NULL)) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->quals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_quals = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2026
 *     cdef tuple v_fromlist = _pg_list_to_tuple(data.fromlist, offset_to_index)
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 *     return ast.FromExpr(v_fromlist, v_quals)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FromExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_fromlist, __pyx_v_v_quals};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __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;

  /* "pglast/ast.pyx":2023
 * 
 * 
 * cdef create_FromExpr(structs.FromExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_fromlist = _pg_list_to_tuple(data.fromlist, offset_to_index)
 *     cdef object v_quals = create(data.quals, offset_to_index) if data.quals is not NULL else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_FromExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_fromlist);
  __Pyx_XDECREF(__pyx_v_v_quals);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2029
 * 
 * 
 * cdef create_OnConflictExpr(structs.OnConflictExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef tuple v_arbiterElems = _pg_list_to_tuple(data.arbiterElems, offset_to_index)
 */

static PyObject *__pyx_f_6pglast_6parser_create_OnConflictExpr(OnConflictExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_action = 0;
  PyObject *__pyx_v_v_arbiterElems = 0;
  PyObject *__pyx_v_v_arbiterWhere = 0;
  PyObject *__pyx_v_v_onConflictSet = 0;
  PyObject *__pyx_v_v_onConflictWhere = 0;
  PyObject *__pyx_v_v_exclRelIndex = 0;
  PyObject *__pyx_v_v_exclRelTlist = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_OnConflictExpr", 0);

  /* "pglast/ast.pyx":2030
 * 
 * cdef create_OnConflictExpr(structs.OnConflictExpr* data, offset_to_index):
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)             # <<<<<<<<<<<<<<
 *     cdef tuple v_arbiterElems = _pg_list_to_tuple(data.arbiterElems, offset_to_index)
 *     cdef object v_arbiterWhere = create(data.arbiterWhere, offset_to_index) if data.arbiterWhere is not NULL else None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_n_u_OnConflictAction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_OnConflictAction(__pyx_v_data->action); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2031
 * cdef create_OnConflictExpr(structs.OnConflictExpr* data, offset_to_index):
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef tuple v_arbiterElems = _pg_list_to_tuple(data.arbiterElems, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_arbiterWhere = create(data.arbiterWhere, offset_to_index) if data.arbiterWhere is not NULL else None
 *     cdef tuple v_onConflictSet = _pg_list_to_tuple(data.onConflictSet, offset_to_index)
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->arbiterElems, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 2031, __pyx_L1_error)
  __pyx_v_v_arbiterElems = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2032
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef tuple v_arbiterElems = _pg_list_to_tuple(data.arbiterElems, offset_to_index)
 *     cdef object v_arbiterWhere = create(data.arbiterWhere, offset_to_index) if data.arbiterWhere is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_onConflictSet = _pg_list_to_tuple(data.onConflictSet, offset_to_index)
 *     cdef object v_onConflictWhere = create(data.onConflictWhere, offset_to_index) if data.onConflictWhere is not NULL else None
 */
  if ((__pyx_v_data->arbiterWhere != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arbiterWhere, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_arbiterWhere = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2033
 *     cdef tuple v_arbiterElems = _pg_list_to_tuple(data.arbiterElems, offset_to_index)
 *     cdef object v_arbiterWhere = create(data.arbiterWhere, offset_to_index) if data.arbiterWhere is not NULL else None
 *     cdef tuple v_onConflictSet = _pg_list_to_tuple(data.onConflictSet, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_onConflictWhere = create(data.onConflictWhere, offset_to_index) if data.onConflictWhere is not NULL else None
 *     cdef object v_exclRelIndex = data.exclRelIndex
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->onConflictSet, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 2033, __pyx_L1_error)
  __pyx_v_v_onConflictSet = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2034
 *     cdef object v_arbiterWhere = create(data.arbiterWhere, offset_to_index) if data.arbiterWhere is not NULL else None
 *     cdef tuple v_onConflictSet = _pg_list_to_tuple(data.onConflictSet, offset_to_index)
 *     cdef object v_onConflictWhere = create(data.onConflictWhere, offset_to_index) if data.onConflictWhere is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_exclRelIndex = data.exclRelIndex
 *     cdef tuple v_exclRelTlist = _pg_list_to_tuple(data.exclRelTlist, offset_to_index)
 */
  if ((__pyx_v_data->onConflictWhere != NULL)) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->onConflictWhere, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_onConflictWhere = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2035
 *     cdef tuple v_onConflictSet = _pg_list_to_tuple(data.onConflictSet, offset_to_index)
 *     cdef object v_onConflictWhere = create(data.onConflictWhere, offset_to_index) if data.onConflictWhere is not NULL else None
 *     cdef object v_exclRelIndex = data.exclRelIndex             # <<<<<<<<<<<<<<
 *     cdef tuple v_exclRelTlist = _pg_list_to_tuple(data.exclRelTlist, offset_to_index)
 *     return ast.OnConflictExpr(v_action, v_arbiterElems, v_arbiterWhere, v_onConflictSet, v_onConflictWhere, v_exclRelIndex, v_exclRelTlist)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->exclRelIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_exclRelIndex = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2036
 *     cdef object v_onConflictWhere = create(data.onConflictWhere, offset_to_index) if data.onConflictWhere is not NULL else None
 *     cdef object v_exclRelIndex = data.exclRelIndex
 *     cdef tuple v_exclRelTlist = _pg_list_to_tuple(data.exclRelTlist, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.OnConflictExpr(v_action, v_arbiterElems, v_arbiterWhere, v_onConflictSet, v_onConflictWhere, v_exclRelIndex, v_exclRelTlist)
 * 
 */
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->exclRelTlist, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(0, 2036, __pyx_L1_error)
  __pyx_v_v_exclRelTlist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2037
 *     cdef object v_exclRelIndex = data.exclRelIndex
 *     cdef tuple v_exclRelTlist = _pg_list_to_tuple(data.exclRelTlist, offset_to_index)
 *     return ast.OnConflictExpr(v_action, v_arbiterElems, v_arbiterWhere, v_onConflictSet, v_onConflictWhere, v_exclRelIndex, v_exclRelTlist)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OnConflictExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_action, __pyx_v_v_arbiterElems, __pyx_v_v_arbiterWhere, __pyx_v_v_onConflictSet, __pyx_v_v_onConflictWhere, __pyx_v_v_exclRelIndex, __pyx_v_v_exclRelTlist};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __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;

  /* "pglast/ast.pyx":2029
 * 
 * 
 * cdef create_OnConflictExpr(structs.OnConflictExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_action = getattr(enums, 'OnConflictAction')(data.action)
 *     cdef tuple v_arbiterElems = _pg_list_to_tuple(data.arbiterElems, offset_to_index)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_OnConflictExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_action);
  __Pyx_XDECREF(__pyx_v_v_arbiterElems);
  __Pyx_XDECREF(__pyx_v_v_arbiterWhere);
  __Pyx_XDECREF(__pyx_v_v_onConflictSet);
  __Pyx_XDECREF(__pyx_v_v_onConflictWhere);
  __Pyx_XDECREF(__pyx_v_v_exclRelIndex);
  __Pyx_XDECREF(__pyx_v_v_exclRelTlist);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2040
 * 
 * 
 * cdef create_Integer(structs.Integer* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_ival = data.ival
 *     return ast.Integer(v_ival)
 */

static PyObject *__pyx_f_6pglast_6parser_create_Integer(Integer *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_ival = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Integer", 0);

  /* "pglast/ast.pyx":2041
 * 
 * cdef create_Integer(structs.Integer* data, offset_to_index):
 *     cdef object v_ival = data.ival             # <<<<<<<<<<<<<<
 *     return ast.Integer(v_ival)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_data->ival); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ival = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2042
 * cdef create_Integer(structs.Integer* data, offset_to_index):
 *     cdef object v_ival = data.ival
 *     return ast.Integer(v_ival)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_ival};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __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;

  /* "pglast/ast.pyx":2040
 * 
 * 
 * cdef create_Integer(structs.Integer* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_ival = data.ival
 *     return ast.Integer(v_ival)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create_Integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_ival);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2045
 * 
 * 
 * cdef create_Float(structs.Float* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_fval = data.fval.decode("utf-8") if data.fval is not NULL else None
 *     return ast.Float(v_fval)
 */

static PyObject *__pyx_f_6pglast_6parser_create_Float(Float *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_fval = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Float", 0);

  /* "pglast/ast.pyx":2046
 * 
 * cdef create_Float(structs.Float* data, offset_to_index):
 *     cdef object v_fval = data.fval.decode("utf-8") if data.fval is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.Float(v_fval)
 * 
 */
  if ((__pyx_v_data->fval != NULL)) {
    __pyx_t_2 = __pyx_v_data->fval;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_fval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2047
 * cdef create_Float(structs.Float* data, offset_to_index):
 *     cdef object v_fval = data.fval.decode("utf-8") if data.fval is not NULL else None
 *     return ast.Float(v_fval)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Float); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_fval};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2045
 * 
 * 
 * cdef create_Float(structs.Float* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_fval = data.fval.decode("utf-8") if data.fval is not NULL else None
 *     return ast.Float(v_fval)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_Float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_fval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2050
 * 
 * 
 * cdef create_Boolean(structs.Boolean* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_boolval = bool(data.boolval)
 *     return ast.Boolean(v_boolval)
 */

static PyObject *__pyx_f_6pglast_6parser_create_Boolean(Boolean *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_boolval = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Boolean", 0);

  /* "pglast/ast.pyx":2051
 * 
 * cdef create_Boolean(structs.Boolean* data, offset_to_index):
 *     cdef object v_boolval = bool(data.boolval)             # <<<<<<<<<<<<<<
 *     return ast.Boolean(v_boolval)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->boolval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_boolval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2052
 * cdef create_Boolean(structs.Boolean* data, offset_to_index):
 *     cdef object v_boolval = bool(data.boolval)
 *     return ast.Boolean(v_boolval)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Boolean); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_boolval};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2050
 * 
 * 
 * cdef create_Boolean(structs.Boolean* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_boolval = bool(data.boolval)
 *     return ast.Boolean(v_boolval)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_Boolean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_boolval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2055
 * 
 * 
 * cdef create_String(structs.String* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sval = data.sval.decode("utf-8") if data.sval is not NULL else None
 *     return ast.String(v_sval)
 */

static PyObject *__pyx_f_6pglast_6parser_create_String(String *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_sval = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_String", 0);

  /* "pglast/ast.pyx":2056
 * 
 * cdef create_String(structs.String* data, offset_to_index):
 *     cdef object v_sval = data.sval.decode("utf-8") if data.sval is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.String(v_sval)
 * 
 */
  if ((__pyx_v_data->sval != NULL)) {
    __pyx_t_2 = __pyx_v_data->sval;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_sval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2057
 * cdef create_String(structs.String* data, offset_to_index):
 *     cdef object v_sval = data.sval.decode("utf-8") if data.sval is not NULL else None
 *     return ast.String(v_sval)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_String); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_sval};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2055
 * 
 * 
 * cdef create_String(structs.String* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_sval = data.sval.decode("utf-8") if data.sval is not NULL else None
 *     return ast.String(v_sval)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_String", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_sval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2060
 * 
 * 
 * cdef create_BitString(structs.BitString* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_bsval = data.bsval.decode("utf-8") if data.bsval is not NULL else None
 *     return ast.BitString(v_bsval)
 */

static PyObject *__pyx_f_6pglast_6parser_create_BitString(BitString *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_bsval = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_BitString", 0);

  /* "pglast/ast.pyx":2061
 * 
 * cdef create_BitString(structs.BitString* data, offset_to_index):
 *     cdef object v_bsval = data.bsval.decode("utf-8") if data.bsval is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.BitString(v_bsval)
 * 
 */
  if ((__pyx_v_data->bsval != NULL)) {
    __pyx_t_2 = __pyx_v_data->bsval;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_bsval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2062
 * cdef create_BitString(structs.BitString* data, offset_to_index):
 *     cdef object v_bsval = data.bsval.decode("utf-8") if data.bsval is not NULL else None
 *     return ast.BitString(v_bsval)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_BitString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_bsval};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2060
 * 
 * 
 * cdef create_BitString(structs.BitString* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_bsval = data.bsval.decode("utf-8") if data.bsval is not NULL else None
 *     return ast.BitString(v_bsval)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.create_BitString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_bsval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2065
 * 
 * 
 * cdef create_A_Const(structs.A_Const* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_isnull = bool(data.isnull)
 *     cdef object v_val
 */

static PyObject *__pyx_f_6pglast_6parser_create_A_Const(A_Const *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_isnull = 0;
  PyObject *__pyx_v_v_val = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Const", 0);

  /* "pglast/ast.pyx":2066
 * 
 * cdef create_A_Const(structs.A_Const* data, offset_to_index):
 *     cdef object v_isnull = bool(data.isnull)             # <<<<<<<<<<<<<<
 *     cdef object v_val
 *     if data.isnull:
 */
  __pyx_t_1 = __Pyx_PyInt_From_bool(__pyx_v_data->isnull); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isnull = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2068
 *     cdef object v_isnull = bool(data.isnull)
 *     cdef object v_val
 *     if data.isnull:             # <<<<<<<<<<<<<<
 *         v_val = None
 *     elif data.val.boolval.type == structs.T_Boolean:
 */
  __pyx_t_2 = (__pyx_v_data->isnull != 0);
  if (__pyx_t_2) {

    /* "pglast/ast.pyx":2069
 *     cdef object v_val
 *     if data.isnull:
 *         v_val = None             # <<<<<<<<<<<<<<
 *     elif data.val.boolval.type == structs.T_Boolean:
 *         v_val = ast.Boolean(data.val.boolval.boolval)
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_v_val = Py_None;

    /* "pglast/ast.pyx":2068
 *     cdef object v_isnull = bool(data.isnull)
 *     cdef object v_val
 *     if data.isnull:             # <<<<<<<<<<<<<<
 *         v_val = None
 *     elif data.val.boolval.type == structs.T_Boolean:
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":2070
 *     if data.isnull:
 *         v_val = None
 *     elif data.val.boolval.type == structs.T_Boolean:             # <<<<<<<<<<<<<<
 *         v_val = ast.Boolean(data.val.boolval.boolval)
 *     elif data.val.ival.type == structs.T_Integer:
 */
  __pyx_t_2 = (__pyx_v_data->val.boolval.type == T_Boolean);
  if (__pyx_t_2) {

    /* "pglast/ast.pyx":2071
 *         v_val = None
 *     elif data.val.boolval.type == structs.T_Boolean:
 *         v_val = ast.Boolean(data.val.boolval.boolval)             # <<<<<<<<<<<<<<
 *     elif data.val.ival.type == structs.T_Integer:
 *         v_val = ast.Integer(data.val.ival.ival)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Boolean); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_bool(__pyx_v_data->val.boolval.boolval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2071, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2070
 *     if data.isnull:
 *         v_val = None
 *     elif data.val.boolval.type == structs.T_Boolean:             # <<<<<<<<<<<<<<
 *         v_val = ast.Boolean(data.val.boolval.boolval)
 *     elif data.val.ival.type == structs.T_Integer:
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":2072
 *     elif data.val.boolval.type == structs.T_Boolean:
 *         v_val = ast.Boolean(data.val.boolval.boolval)
 *     elif data.val.ival.type == structs.T_Integer:             # <<<<<<<<<<<<<<
 *         v_val = ast.Integer(data.val.ival.ival)
 *     elif data.val.fval.type == structs.T_Float:
 */
  __pyx_t_2 = (__pyx_v_data->val.ival.type == T_Integer);
  if (__pyx_t_2) {

    /* "pglast/ast.pyx":2073
 *         v_val = ast.Boolean(data.val.boolval.boolval)
 *     elif data.val.ival.type == structs.T_Integer:
 *         v_val = ast.Integer(data.val.ival.ival)             # <<<<<<<<<<<<<<
 *     elif data.val.fval.type == structs.T_Float:
 *         v_val = _pg_str_to_decimal(data.val.fval.fval)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_data->val.ival.ival); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2072
 *     elif data.val.boolval.type == structs.T_Boolean:
 *         v_val = ast.Boolean(data.val.boolval.boolval)
 *     elif data.val.ival.type == structs.T_Integer:             # <<<<<<<<<<<<<<
 *         v_val = ast.Integer(data.val.ival.ival)
 *     elif data.val.fval.type == structs.T_Float:
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":2074
 *     elif data.val.ival.type == structs.T_Integer:
 *         v_val = ast.Integer(data.val.ival.ival)
 *     elif data.val.fval.type == structs.T_Float:             # <<<<<<<<<<<<<<
 *         v_val = _pg_str_to_decimal(data.val.fval.fval)
 *     elif data.val.bsval.type == structs.T_BitString:
 */
  __pyx_t_2 = (__pyx_v_data->val.fval.type == T_Float);
  if (__pyx_t_2) {

    /* "pglast/ast.pyx":2075
 *         v_val = ast.Integer(data.val.ival.ival)
 *     elif data.val.fval.type == structs.T_Float:
 *         v_val = _pg_str_to_decimal(data.val.fval.fval)             # <<<<<<<<<<<<<<
 *     elif data.val.bsval.type == structs.T_BitString:
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))
 */
    __pyx_t_1 = __pyx_f_6pglast_6parser__pg_str_to_decimal(__pyx_v_data->val.fval.fval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2074
 *     elif data.val.ival.type == structs.T_Integer:
 *         v_val = ast.Integer(data.val.ival.ival)
 *     elif data.val.fval.type == structs.T_Float:             # <<<<<<<<<<<<<<
 *         v_val = _pg_str_to_decimal(data.val.fval.fval)
 *     elif data.val.bsval.type == structs.T_BitString:
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":2076
 *     elif data.val.fval.type == structs.T_Float:
 *         v_val = _pg_str_to_decimal(data.val.fval.fval)
 *     elif data.val.bsval.type == structs.T_BitString:             # <<<<<<<<<<<<<<
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))
 *     elif data.val.sval.type == structs.T_String:
 */
  __pyx_t_2 = (__pyx_v_data->val.bsval.type == T_BitString);
  if (__pyx_t_2) {

    /* "pglast/ast.pyx":2077
 *         v_val = _pg_str_to_decimal(data.val.fval.fval)
 *     elif data.val.bsval.type == structs.T_BitString:
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))             # <<<<<<<<<<<<<<
 *     elif data.val.sval.type == structs.T_String:
 *         v_val = ast.String(data.val.sval.sval.decode("utf-8"))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_BitString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_v_data->val.bsval.bsval;
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2077, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2076
 *     elif data.val.fval.type == structs.T_Float:
 *         v_val = _pg_str_to_decimal(data.val.fval.fval)
 *     elif data.val.bsval.type == structs.T_BitString:             # <<<<<<<<<<<<<<
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))
 *     elif data.val.sval.type == structs.T_String:
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":2078
 *     elif data.val.bsval.type == structs.T_BitString:
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))
 *     elif data.val.sval.type == structs.T_String:             # <<<<<<<<<<<<<<
 *         v_val = ast.String(data.val.sval.sval.decode("utf-8"))
 *     else:
 */
  __pyx_t_2 = (__pyx_v_data->val.sval.type == T_String);
  if (__pyx_t_2) {

    /* "pglast/ast.pyx":2079
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))
 *     elif data.val.sval.type == structs.T_String:
 *         v_val = ast.String(data.val.sval.sval.decode("utf-8"))             # <<<<<<<<<<<<<<
 *     else:
 *         v_val = data.val.node
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_String); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __pyx_v_data->val.sval.sval;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2078
 *     elif data.val.bsval.type == structs.T_BitString:
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))
 *     elif data.val.sval.type == structs.T_String:             # <<<<<<<<<<<<<<
 *         v_val = ast.String(data.val.sval.sval.decode("utf-8"))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":2081
 *         v_val = ast.String(data.val.sval.sval.decode("utf-8"))
 *     else:
 *         v_val = data.val.node             # <<<<<<<<<<<<<<
 *     return ast.A_Const(v_isnull, v_val)
 * 
 */
  /*else*/ {
    __pyx_t_1 = __pyx_convert__to_py_Node(__pyx_v_data->val.node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pglast/ast.pyx":2082
 *     else:
 *         v_val = data.val.node
 *     return ast.A_Const(v_isnull, v_val)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_A_Const); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_isnull, __pyx_v_v_val};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2065
 * 
 * 
 * cdef create_A_Const(structs.A_Const* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_isnull = bool(data.isnull)
 *     cdef object v_val
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_A_Const", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_isnull);
  __Pyx_XDECREF(__pyx_v_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2085
 * 
 * 
 * cdef create(void* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     if data is NULL:
 *         return None
 */

static PyObject *__pyx_f_6pglast_6parser_create(void *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  int __pyx_v_tag;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create", 0);

  /* "pglast/ast.pyx":2086
 * 
 * cdef create(void* data, offset_to_index):
 *     if data is NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = (__pyx_v_data == NULL);
  if (__pyx_t_1) {

    /* "pglast/ast.pyx":2087
 * cdef create(void* data, offset_to_index):
 *     if data is NULL:
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     cdef tuple t
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pglast/ast.pyx":2086
 * 
 * cdef create(void* data, offset_to_index):
 *     if data is NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "pglast/ast.pyx":2092
 *     cdef int i
 *     cdef str s
 *     cdef int tag = structs.nodeTag(data)             # <<<<<<<<<<<<<<
 * 
 *     if tag == structs.T_Alias:
 */
  __pyx_v_tag = nodeTag(__pyx_v_data);

  /* "pglast/ast.pyx":2094
 *     cdef int tag = structs.nodeTag(data)
 * 
 *     if tag == structs.T_Alias:             # <<<<<<<<<<<<<<
 *         return create_Alias(<structs.Alias*> data, offset_to_index)
 *     elif tag == structs.T_RangeVar:
 */
  switch (__pyx_v_tag) {
    case T_Alias:

    /* "pglast/ast.pyx":2095
 * 
 *     if tag == structs.T_Alias:
 *         return create_Alias(<structs.Alias*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeVar:
 *         return create_RangeVar(<structs.RangeVar*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Alias(((Alias *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2094
 *     cdef int tag = structs.nodeTag(data)
 * 
 *     if tag == structs.T_Alias:             # <<<<<<<<<<<<<<
 *         return create_Alias(<structs.Alias*> data, offset_to_index)
 *     elif tag == structs.T_RangeVar:
 */
    break;
    case T_RangeVar:

    /* "pglast/ast.pyx":2097
 *         return create_Alias(<structs.Alias*> data, offset_to_index)
 *     elif tag == structs.T_RangeVar:
 *         return create_RangeVar(<structs.RangeVar*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TableFunc:
 *         return create_TableFunc(<structs.TableFunc*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeVar(((RangeVar *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2096
 *     if tag == structs.T_Alias:
 *         return create_Alias(<structs.Alias*> data, offset_to_index)
 *     elif tag == structs.T_RangeVar:             # <<<<<<<<<<<<<<
 *         return create_RangeVar(<structs.RangeVar*> data, offset_to_index)
 *     elif tag == structs.T_TableFunc:
 */
    break;
    case T_TableFunc:

    /* "pglast/ast.pyx":2099
 *         return create_RangeVar(<structs.RangeVar*> data, offset_to_index)
 *     elif tag == structs.T_TableFunc:
 *         return create_TableFunc(<structs.TableFunc*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Var:
 *         return create_Var(<structs.Var*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TableFunc(((TableFunc *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2098
 *     elif tag == structs.T_RangeVar:
 *         return create_RangeVar(<structs.RangeVar*> data, offset_to_index)
 *     elif tag == structs.T_TableFunc:             # <<<<<<<<<<<<<<
 *         return create_TableFunc(<structs.TableFunc*> data, offset_to_index)
 *     elif tag == structs.T_Var:
 */
    break;
    case T_Var:

    /* "pglast/ast.pyx":2101
 *         return create_TableFunc(<structs.TableFunc*> data, offset_to_index)
 *     elif tag == structs.T_Var:
 *         return create_Var(<structs.Var*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Param:
 *         return create_Param(<structs.Param*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Var(((Var *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2100
 *     elif tag == structs.T_TableFunc:
 *         return create_TableFunc(<structs.TableFunc*> data, offset_to_index)
 *     elif tag == structs.T_Var:             # <<<<<<<<<<<<<<
 *         return create_Var(<structs.Var*> data, offset_to_index)
 *     elif tag == structs.T_Param:
 */
    break;
    case T_Param:

    /* "pglast/ast.pyx":2103
 *         return create_Var(<structs.Var*> data, offset_to_index)
 *     elif tag == structs.T_Param:
 *         return create_Param(<structs.Param*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Aggref:
 *         return create_Aggref(<structs.Aggref*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Param(((Param *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2102
 *     elif tag == structs.T_Var:
 *         return create_Var(<structs.Var*> data, offset_to_index)
 *     elif tag == structs.T_Param:             # <<<<<<<<<<<<<<
 *         return create_Param(<structs.Param*> data, offset_to_index)
 *     elif tag == structs.T_Aggref:
 */
    break;
    case T_Aggref:

    /* "pglast/ast.pyx":2105
 *         return create_Param(<structs.Param*> data, offset_to_index)
 *     elif tag == structs.T_Aggref:
 *         return create_Aggref(<structs.Aggref*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_GroupingFunc:
 *         return create_GroupingFunc(<structs.GroupingFunc*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Aggref(((Aggref *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2104
 *     elif tag == structs.T_Param:
 *         return create_Param(<structs.Param*> data, offset_to_index)
 *     elif tag == structs.T_Aggref:             # <<<<<<<<<<<<<<
 *         return create_Aggref(<structs.Aggref*> data, offset_to_index)
 *     elif tag == structs.T_GroupingFunc:
 */
    break;
    case T_GroupingFunc:

    /* "pglast/ast.pyx":2107
 *         return create_Aggref(<structs.Aggref*> data, offset_to_index)
 *     elif tag == structs.T_GroupingFunc:
 *         return create_GroupingFunc(<structs.GroupingFunc*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_WindowFunc:
 *         return create_WindowFunc(<structs.WindowFunc*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_GroupingFunc(((GroupingFunc *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2106
 *     elif tag == structs.T_Aggref:
 *         return create_Aggref(<structs.Aggref*> data, offset_to_index)
 *     elif tag == structs.T_GroupingFunc:             # <<<<<<<<<<<<<<
 *         return create_GroupingFunc(<structs.GroupingFunc*> data, offset_to_index)
 *     elif tag == structs.T_WindowFunc:
 */
    break;
    case T_WindowFunc:

    /* "pglast/ast.pyx":2109
 *         return create_GroupingFunc(<structs.GroupingFunc*> data, offset_to_index)
 *     elif tag == structs.T_WindowFunc:
 *         return create_WindowFunc(<structs.WindowFunc*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SubscriptingRef:
 *         return create_SubscriptingRef(<structs.SubscriptingRef*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_WindowFunc(((WindowFunc *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2108
 *     elif tag == structs.T_GroupingFunc:
 *         return create_GroupingFunc(<structs.GroupingFunc*> data, offset_to_index)
 *     elif tag == structs.T_WindowFunc:             # <<<<<<<<<<<<<<
 *         return create_WindowFunc(<structs.WindowFunc*> data, offset_to_index)
 *     elif tag == structs.T_SubscriptingRef:
 */
    break;
    case T_SubscriptingRef:

    /* "pglast/ast.pyx":2111
 *         return create_WindowFunc(<structs.WindowFunc*> data, offset_to_index)
 *     elif tag == structs.T_SubscriptingRef:
 *         return create_SubscriptingRef(<structs.SubscriptingRef*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_FuncExpr:
 *         return create_FuncExpr(<structs.FuncExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SubscriptingRef(((SubscriptingRef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2110
 *     elif tag == structs.T_WindowFunc:
 *         return create_WindowFunc(<structs.WindowFunc*> data, offset_to_index)
 *     elif tag == structs.T_SubscriptingRef:             # <<<<<<<<<<<<<<
 *         return create_SubscriptingRef(<structs.SubscriptingRef*> data, offset_to_index)
 *     elif tag == structs.T_FuncExpr:
 */
    break;
    case T_FuncExpr:

    /* "pglast/ast.pyx":2113
 *         return create_SubscriptingRef(<structs.SubscriptingRef*> data, offset_to_index)
 *     elif tag == structs.T_FuncExpr:
 *         return create_FuncExpr(<structs.FuncExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_NamedArgExpr:
 *         return create_NamedArgExpr(<structs.NamedArgExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_FuncExpr(((FuncExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2112
 *     elif tag == structs.T_SubscriptingRef:
 *         return create_SubscriptingRef(<structs.SubscriptingRef*> data, offset_to_index)
 *     elif tag == structs.T_FuncExpr:             # <<<<<<<<<<<<<<
 *         return create_FuncExpr(<structs.FuncExpr*> data, offset_to_index)
 *     elif tag == structs.T_NamedArgExpr:
 */
    break;
    case T_NamedArgExpr:

    /* "pglast/ast.pyx":2115
 *         return create_FuncExpr(<structs.FuncExpr*> data, offset_to_index)
 *     elif tag == structs.T_NamedArgExpr:
 *         return create_NamedArgExpr(<structs.NamedArgExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_OpExpr:
 *         return create_OpExpr(<structs.OpExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_NamedArgExpr(((NamedArgExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2114
 *     elif tag == structs.T_FuncExpr:
 *         return create_FuncExpr(<structs.FuncExpr*> data, offset_to_index)
 *     elif tag == structs.T_NamedArgExpr:             # <<<<<<<<<<<<<<
 *         return create_NamedArgExpr(<structs.NamedArgExpr*> data, offset_to_index)
 *     elif tag == structs.T_OpExpr:
 */
    break;
    case T_OpExpr:

    /* "pglast/ast.pyx":2117
 *         return create_NamedArgExpr(<structs.NamedArgExpr*> data, offset_to_index)
 *     elif tag == structs.T_OpExpr:
 *         return create_OpExpr(<structs.OpExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ScalarArrayOpExpr:
 *         return create_ScalarArrayOpExpr(<structs.ScalarArrayOpExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_OpExpr(((OpExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2116
 *     elif tag == structs.T_NamedArgExpr:
 *         return create_NamedArgExpr(<structs.NamedArgExpr*> data, offset_to_index)
 *     elif tag == structs.T_OpExpr:             # <<<<<<<<<<<<<<
 *         return create_OpExpr(<structs.OpExpr*> data, offset_to_index)
 *     elif tag == structs.T_ScalarArrayOpExpr:
 */
    break;
    case T_ScalarArrayOpExpr:

    /* "pglast/ast.pyx":2119
 *         return create_OpExpr(<structs.OpExpr*> data, offset_to_index)
 *     elif tag == structs.T_ScalarArrayOpExpr:
 *         return create_ScalarArrayOpExpr(<structs.ScalarArrayOpExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_BoolExpr:
 *         return create_BoolExpr(<structs.BoolExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ScalarArrayOpExpr(((ScalarArrayOpExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2118
 *     elif tag == structs.T_OpExpr:
 *         return create_OpExpr(<structs.OpExpr*> data, offset_to_index)
 *     elif tag == structs.T_ScalarArrayOpExpr:             # <<<<<<<<<<<<<<
 *         return create_ScalarArrayOpExpr(<structs.ScalarArrayOpExpr*> data, offset_to_index)
 *     elif tag == structs.T_BoolExpr:
 */
    break;
    case T_BoolExpr:

    /* "pglast/ast.pyx":2121
 *         return create_ScalarArrayOpExpr(<structs.ScalarArrayOpExpr*> data, offset_to_index)
 *     elif tag == structs.T_BoolExpr:
 *         return create_BoolExpr(<structs.BoolExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SubLink:
 *         return create_SubLink(<structs.SubLink*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_BoolExpr(((BoolExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2120
 *     elif tag == structs.T_ScalarArrayOpExpr:
 *         return create_ScalarArrayOpExpr(<structs.ScalarArrayOpExpr*> data, offset_to_index)
 *     elif tag == structs.T_BoolExpr:             # <<<<<<<<<<<<<<
 *         return create_BoolExpr(<structs.BoolExpr*> data, offset_to_index)
 *     elif tag == structs.T_SubLink:
 */
    break;
    case T_SubLink:

    /* "pglast/ast.pyx":2123
 *         return create_BoolExpr(<structs.BoolExpr*> data, offset_to_index)
 *     elif tag == structs.T_SubLink:
 *         return create_SubLink(<structs.SubLink*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SubPlan:
 *         return create_SubPlan(<structs.SubPlan*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SubLink(((SubLink *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2122
 *     elif tag == structs.T_BoolExpr:
 *         return create_BoolExpr(<structs.BoolExpr*> data, offset_to_index)
 *     elif tag == structs.T_SubLink:             # <<<<<<<<<<<<<<
 *         return create_SubLink(<structs.SubLink*> data, offset_to_index)
 *     elif tag == structs.T_SubPlan:
 */
    break;
    case T_SubPlan:

    /* "pglast/ast.pyx":2125
 *         return create_SubLink(<structs.SubLink*> data, offset_to_index)
 *     elif tag == structs.T_SubPlan:
 *         return create_SubPlan(<structs.SubPlan*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlternativeSubPlan:
 *         return create_AlternativeSubPlan(<structs.AlternativeSubPlan*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SubPlan(((SubPlan *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2124
 *     elif tag == structs.T_SubLink:
 *         return create_SubLink(<structs.SubLink*> data, offset_to_index)
 *     elif tag == structs.T_SubPlan:             # <<<<<<<<<<<<<<
 *         return create_SubPlan(<structs.SubPlan*> data, offset_to_index)
 *     elif tag == structs.T_AlternativeSubPlan:
 */
    break;
    case T_AlternativeSubPlan:

    /* "pglast/ast.pyx":2127
 *         return create_SubPlan(<structs.SubPlan*> data, offset_to_index)
 *     elif tag == structs.T_AlternativeSubPlan:
 *         return create_AlternativeSubPlan(<structs.AlternativeSubPlan*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_FieldSelect:
 *         return create_FieldSelect(<structs.FieldSelect*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlternativeSubPlan(((AlternativeSubPlan *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2126
 *     elif tag == structs.T_SubPlan:
 *         return create_SubPlan(<structs.SubPlan*> data, offset_to_index)
 *     elif tag == structs.T_AlternativeSubPlan:             # <<<<<<<<<<<<<<
 *         return create_AlternativeSubPlan(<structs.AlternativeSubPlan*> data, offset_to_index)
 *     elif tag == structs.T_FieldSelect:
 */
    break;
    case T_FieldSelect:

    /* "pglast/ast.pyx":2129
 *         return create_AlternativeSubPlan(<structs.AlternativeSubPlan*> data, offset_to_index)
 *     elif tag == structs.T_FieldSelect:
 *         return create_FieldSelect(<structs.FieldSelect*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_FieldStore:
 *         return create_FieldStore(<structs.FieldStore*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_FieldSelect(((FieldSelect *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2128
 *     elif tag == structs.T_AlternativeSubPlan:
 *         return create_AlternativeSubPlan(<structs.AlternativeSubPlan*> data, offset_to_index)
 *     elif tag == structs.T_FieldSelect:             # <<<<<<<<<<<<<<
 *         return create_FieldSelect(<structs.FieldSelect*> data, offset_to_index)
 *     elif tag == structs.T_FieldStore:
 */
    break;
    case T_FieldStore:

    /* "pglast/ast.pyx":2131
 *         return create_FieldSelect(<structs.FieldSelect*> data, offset_to_index)
 *     elif tag == structs.T_FieldStore:
 *         return create_FieldStore(<structs.FieldStore*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RelabelType:
 *         return create_RelabelType(<structs.RelabelType*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_FieldStore(((FieldStore *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2130
 *     elif tag == structs.T_FieldSelect:
 *         return create_FieldSelect(<structs.FieldSelect*> data, offset_to_index)
 *     elif tag == structs.T_FieldStore:             # <<<<<<<<<<<<<<
 *         return create_FieldStore(<structs.FieldStore*> data, offset_to_index)
 *     elif tag == structs.T_RelabelType:
 */
    break;
    case T_RelabelType:

    /* "pglast/ast.pyx":2133
 *         return create_FieldStore(<structs.FieldStore*> data, offset_to_index)
 *     elif tag == structs.T_RelabelType:
 *         return create_RelabelType(<structs.RelabelType*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CoerceViaIO:
 *         return create_CoerceViaIO(<structs.CoerceViaIO*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RelabelType(((RelabelType *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2132
 *     elif tag == structs.T_FieldStore:
 *         return create_FieldStore(<structs.FieldStore*> data, offset_to_index)
 *     elif tag == structs.T_RelabelType:             # <<<<<<<<<<<<<<
 *         return create_RelabelType(<structs.RelabelType*> data, offset_to_index)
 *     elif tag == structs.T_CoerceViaIO:
 */
    break;
    case T_CoerceViaIO:

    /* "pglast/ast.pyx":2135
 *         return create_RelabelType(<structs.RelabelType*> data, offset_to_index)
 *     elif tag == structs.T_CoerceViaIO:
 *         return create_CoerceViaIO(<structs.CoerceViaIO*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ArrayCoerceExpr:
 *         return create_ArrayCoerceExpr(<structs.ArrayCoerceExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CoerceViaIO(((CoerceViaIO *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2134
 *     elif tag == structs.T_RelabelType:
 *         return create_RelabelType(<structs.RelabelType*> data, offset_to_index)
 *     elif tag == structs.T_CoerceViaIO:             # <<<<<<<<<<<<<<
 *         return create_CoerceViaIO(<structs.CoerceViaIO*> data, offset_to_index)
 *     elif tag == structs.T_ArrayCoerceExpr:
 */
    break;
    case T_ArrayCoerceExpr:

    /* "pglast/ast.pyx":2137
 *         return create_CoerceViaIO(<structs.CoerceViaIO*> data, offset_to_index)
 *     elif tag == structs.T_ArrayCoerceExpr:
 *         return create_ArrayCoerceExpr(<structs.ArrayCoerceExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ConvertRowtypeExpr:
 *         return create_ConvertRowtypeExpr(<structs.ConvertRowtypeExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ArrayCoerceExpr(((ArrayCoerceExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2136
 *     elif tag == structs.T_CoerceViaIO:
 *         return create_CoerceViaIO(<structs.CoerceViaIO*> data, offset_to_index)
 *     elif tag == structs.T_ArrayCoerceExpr:             # <<<<<<<<<<<<<<
 *         return create_ArrayCoerceExpr(<structs.ArrayCoerceExpr*> data, offset_to_index)
 *     elif tag == structs.T_ConvertRowtypeExpr:
 */
    break;
    case T_ConvertRowtypeExpr:

    /* "pglast/ast.pyx":2139
 *         return create_ArrayCoerceExpr(<structs.ArrayCoerceExpr*> data, offset_to_index)
 *     elif tag == structs.T_ConvertRowtypeExpr:
 *         return create_ConvertRowtypeExpr(<structs.ConvertRowtypeExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CollateExpr:
 *         return create_CollateExpr(<structs.CollateExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ConvertRowtypeExpr(((ConvertRowtypeExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2138
 *     elif tag == structs.T_ArrayCoerceExpr:
 *         return create_ArrayCoerceExpr(<structs.ArrayCoerceExpr*> data, offset_to_index)
 *     elif tag == structs.T_ConvertRowtypeExpr:             # <<<<<<<<<<<<<<
 *         return create_ConvertRowtypeExpr(<structs.ConvertRowtypeExpr*> data, offset_to_index)
 *     elif tag == structs.T_CollateExpr:
 */
    break;
    case T_CollateExpr:

    /* "pglast/ast.pyx":2141
 *         return create_ConvertRowtypeExpr(<structs.ConvertRowtypeExpr*> data, offset_to_index)
 *     elif tag == structs.T_CollateExpr:
 *         return create_CollateExpr(<structs.CollateExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CaseExpr:
 *         return create_CaseExpr(<structs.CaseExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CollateExpr(((CollateExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2140
 *     elif tag == structs.T_ConvertRowtypeExpr:
 *         return create_ConvertRowtypeExpr(<structs.ConvertRowtypeExpr*> data, offset_to_index)
 *     elif tag == structs.T_CollateExpr:             # <<<<<<<<<<<<<<
 *         return create_CollateExpr(<structs.CollateExpr*> data, offset_to_index)
 *     elif tag == structs.T_CaseExpr:
 */
    break;
    case T_CaseExpr:

    /* "pglast/ast.pyx":2143
 *         return create_CollateExpr(<structs.CollateExpr*> data, offset_to_index)
 *     elif tag == structs.T_CaseExpr:
 *         return create_CaseExpr(<structs.CaseExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CaseWhen:
 *         return create_CaseWhen(<structs.CaseWhen*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CaseExpr(((CaseExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2142
 *     elif tag == structs.T_CollateExpr:
 *         return create_CollateExpr(<structs.CollateExpr*> data, offset_to_index)
 *     elif tag == structs.T_CaseExpr:             # <<<<<<<<<<<<<<
 *         return create_CaseExpr(<structs.CaseExpr*> data, offset_to_index)
 *     elif tag == structs.T_CaseWhen:
 */
    break;
    case T_CaseWhen:

    /* "pglast/ast.pyx":2145
 *         return create_CaseExpr(<structs.CaseExpr*> data, offset_to_index)
 *     elif tag == structs.T_CaseWhen:
 *         return create_CaseWhen(<structs.CaseWhen*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CaseTestExpr:
 *         return create_CaseTestExpr(<structs.CaseTestExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CaseWhen(((CaseWhen *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2144
 *     elif tag == structs.T_CaseExpr:
 *         return create_CaseExpr(<structs.CaseExpr*> data, offset_to_index)
 *     elif tag == structs.T_CaseWhen:             # <<<<<<<<<<<<<<
 *         return create_CaseWhen(<structs.CaseWhen*> data, offset_to_index)
 *     elif tag == structs.T_CaseTestExpr:
 */
    break;
    case T_CaseTestExpr:

    /* "pglast/ast.pyx":2147
 *         return create_CaseWhen(<structs.CaseWhen*> data, offset_to_index)
 *     elif tag == structs.T_CaseTestExpr:
 *         return create_CaseTestExpr(<structs.CaseTestExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ArrayExpr:
 *         return create_ArrayExpr(<structs.ArrayExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CaseTestExpr(((CaseTestExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2146
 *     elif tag == structs.T_CaseWhen:
 *         return create_CaseWhen(<structs.CaseWhen*> data, offset_to_index)
 *     elif tag == structs.T_CaseTestExpr:             # <<<<<<<<<<<<<<
 *         return create_CaseTestExpr(<structs.CaseTestExpr*> data, offset_to_index)
 *     elif tag == structs.T_ArrayExpr:
 */
    break;
    case T_ArrayExpr:

    /* "pglast/ast.pyx":2149
 *         return create_CaseTestExpr(<structs.CaseTestExpr*> data, offset_to_index)
 *     elif tag == structs.T_ArrayExpr:
 *         return create_ArrayExpr(<structs.ArrayExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RowExpr:
 *         return create_RowExpr(<structs.RowExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ArrayExpr(((ArrayExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2148
 *     elif tag == structs.T_CaseTestExpr:
 *         return create_CaseTestExpr(<structs.CaseTestExpr*> data, offset_to_index)
 *     elif tag == structs.T_ArrayExpr:             # <<<<<<<<<<<<<<
 *         return create_ArrayExpr(<structs.ArrayExpr*> data, offset_to_index)
 *     elif tag == structs.T_RowExpr:
 */
    break;
    case T_RowExpr:

    /* "pglast/ast.pyx":2151
 *         return create_ArrayExpr(<structs.ArrayExpr*> data, offset_to_index)
 *     elif tag == structs.T_RowExpr:
 *         return create_RowExpr(<structs.RowExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RowCompareExpr:
 *         return create_RowCompareExpr(<structs.RowCompareExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RowExpr(((RowExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2150
 *     elif tag == structs.T_ArrayExpr:
 *         return create_ArrayExpr(<structs.ArrayExpr*> data, offset_to_index)
 *     elif tag == structs.T_RowExpr:             # <<<<<<<<<<<<<<
 *         return create_RowExpr(<structs.RowExpr*> data, offset_to_index)
 *     elif tag == structs.T_RowCompareExpr:
 */
    break;
    case T_RowCompareExpr:

    /* "pglast/ast.pyx":2153
 *         return create_RowExpr(<structs.RowExpr*> data, offset_to_index)
 *     elif tag == structs.T_RowCompareExpr:
 *         return create_RowCompareExpr(<structs.RowCompareExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CoalesceExpr:
 *         return create_CoalesceExpr(<structs.CoalesceExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RowCompareExpr(((RowCompareExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2152
 *     elif tag == structs.T_RowExpr:
 *         return create_RowExpr(<structs.RowExpr*> data, offset_to_index)
 *     elif tag == structs.T_RowCompareExpr:             # <<<<<<<<<<<<<<
 *         return create_RowCompareExpr(<structs.RowCompareExpr*> data, offset_to_index)
 *     elif tag == structs.T_CoalesceExpr:
 */
    break;
    case T_CoalesceExpr:

    /* "pglast/ast.pyx":2155
 *         return create_RowCompareExpr(<structs.RowCompareExpr*> data, offset_to_index)
 *     elif tag == structs.T_CoalesceExpr:
 *         return create_CoalesceExpr(<structs.CoalesceExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_MinMaxExpr:
 *         return create_MinMaxExpr(<structs.MinMaxExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CoalesceExpr(((CoalesceExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2154
 *     elif tag == structs.T_RowCompareExpr:
 *         return create_RowCompareExpr(<structs.RowCompareExpr*> data, offset_to_index)
 *     elif tag == structs.T_CoalesceExpr:             # <<<<<<<<<<<<<<
 *         return create_CoalesceExpr(<structs.CoalesceExpr*> data, offset_to_index)
 *     elif tag == structs.T_MinMaxExpr:
 */
    break;
    case T_MinMaxExpr:

    /* "pglast/ast.pyx":2157
 *         return create_CoalesceExpr(<structs.CoalesceExpr*> data, offset_to_index)
 *     elif tag == structs.T_MinMaxExpr:
 *         return create_MinMaxExpr(<structs.MinMaxExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SQLValueFunction:
 *         return create_SQLValueFunction(<structs.SQLValueFunction*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_MinMaxExpr(((MinMaxExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2156
 *     elif tag == structs.T_CoalesceExpr:
 *         return create_CoalesceExpr(<structs.CoalesceExpr*> data, offset_to_index)
 *     elif tag == structs.T_MinMaxExpr:             # <<<<<<<<<<<<<<
 *         return create_MinMaxExpr(<structs.MinMaxExpr*> data, offset_to_index)
 *     elif tag == structs.T_SQLValueFunction:
 */
    break;
    case T_SQLValueFunction:

    /* "pglast/ast.pyx":2159
 *         return create_MinMaxExpr(<structs.MinMaxExpr*> data, offset_to_index)
 *     elif tag == structs.T_SQLValueFunction:
 *         return create_SQLValueFunction(<structs.SQLValueFunction*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_XmlExpr:
 *         return create_XmlExpr(<structs.XmlExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SQLValueFunction(((SQLValueFunction *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2158
 *     elif tag == structs.T_MinMaxExpr:
 *         return create_MinMaxExpr(<structs.MinMaxExpr*> data, offset_to_index)
 *     elif tag == structs.T_SQLValueFunction:             # <<<<<<<<<<<<<<
 *         return create_SQLValueFunction(<structs.SQLValueFunction*> data, offset_to_index)
 *     elif tag == structs.T_XmlExpr:
 */
    break;
    case T_XmlExpr:

    /* "pglast/ast.pyx":2161
 *         return create_SQLValueFunction(<structs.SQLValueFunction*> data, offset_to_index)
 *     elif tag == structs.T_XmlExpr:
 *         return create_XmlExpr(<structs.XmlExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_NullTest:
 *         return create_NullTest(<structs.NullTest*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_XmlExpr(((XmlExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2160
 *     elif tag == structs.T_SQLValueFunction:
 *         return create_SQLValueFunction(<structs.SQLValueFunction*> data, offset_to_index)
 *     elif tag == structs.T_XmlExpr:             # <<<<<<<<<<<<<<
 *         return create_XmlExpr(<structs.XmlExpr*> data, offset_to_index)
 *     elif tag == structs.T_NullTest:
 */
    break;
    case T_NullTest:

    /* "pglast/ast.pyx":2163
 *         return create_XmlExpr(<structs.XmlExpr*> data, offset_to_index)
 *     elif tag == structs.T_NullTest:
 *         return create_NullTest(<structs.NullTest*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_BooleanTest:
 *         return create_BooleanTest(<structs.BooleanTest*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_NullTest(((NullTest *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2162
 *     elif tag == structs.T_XmlExpr:
 *         return create_XmlExpr(<structs.XmlExpr*> data, offset_to_index)
 *     elif tag == structs.T_NullTest:             # <<<<<<<<<<<<<<
 *         return create_NullTest(<structs.NullTest*> data, offset_to_index)
 *     elif tag == structs.T_BooleanTest:
 */
    break;
    case T_BooleanTest:

    /* "pglast/ast.pyx":2165
 *         return create_NullTest(<structs.NullTest*> data, offset_to_index)
 *     elif tag == structs.T_BooleanTest:
 *         return create_BooleanTest(<structs.BooleanTest*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CoerceToDomain:
 *         return create_CoerceToDomain(<structs.CoerceToDomain*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_BooleanTest(((BooleanTest *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2164
 *     elif tag == structs.T_NullTest:
 *         return create_NullTest(<structs.NullTest*> data, offset_to_index)
 *     elif tag == structs.T_BooleanTest:             # <<<<<<<<<<<<<<
 *         return create_BooleanTest(<structs.BooleanTest*> data, offset_to_index)
 *     elif tag == structs.T_CoerceToDomain:
 */
    break;
    case T_CoerceToDomain:

    /* "pglast/ast.pyx":2167
 *         return create_BooleanTest(<structs.BooleanTest*> data, offset_to_index)
 *     elif tag == structs.T_CoerceToDomain:
 *         return create_CoerceToDomain(<structs.CoerceToDomain*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CoerceToDomainValue:
 *         return create_CoerceToDomainValue(<structs.CoerceToDomainValue*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CoerceToDomain(((CoerceToDomain *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2166
 *     elif tag == structs.T_BooleanTest:
 *         return create_BooleanTest(<structs.BooleanTest*> data, offset_to_index)
 *     elif tag == structs.T_CoerceToDomain:             # <<<<<<<<<<<<<<
 *         return create_CoerceToDomain(<structs.CoerceToDomain*> data, offset_to_index)
 *     elif tag == structs.T_CoerceToDomainValue:
 */
    break;
    case T_CoerceToDomainValue:

    /* "pglast/ast.pyx":2169
 *         return create_CoerceToDomain(<structs.CoerceToDomain*> data, offset_to_index)
 *     elif tag == structs.T_CoerceToDomainValue:
 *         return create_CoerceToDomainValue(<structs.CoerceToDomainValue*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SetToDefault:
 *         return create_SetToDefault(<structs.SetToDefault*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CoerceToDomainValue(((CoerceToDomainValue *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2168
 *     elif tag == structs.T_CoerceToDomain:
 *         return create_CoerceToDomain(<structs.CoerceToDomain*> data, offset_to_index)
 *     elif tag == structs.T_CoerceToDomainValue:             # <<<<<<<<<<<<<<
 *         return create_CoerceToDomainValue(<structs.CoerceToDomainValue*> data, offset_to_index)
 *     elif tag == structs.T_SetToDefault:
 */
    break;
    case T_SetToDefault:

    /* "pglast/ast.pyx":2171
 *         return create_CoerceToDomainValue(<structs.CoerceToDomainValue*> data, offset_to_index)
 *     elif tag == structs.T_SetToDefault:
 *         return create_SetToDefault(<structs.SetToDefault*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CurrentOfExpr:
 *         return create_CurrentOfExpr(<structs.CurrentOfExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SetToDefault(((SetToDefault *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2170
 *     elif tag == structs.T_CoerceToDomainValue:
 *         return create_CoerceToDomainValue(<structs.CoerceToDomainValue*> data, offset_to_index)
 *     elif tag == structs.T_SetToDefault:             # <<<<<<<<<<<<<<
 *         return create_SetToDefault(<structs.SetToDefault*> data, offset_to_index)
 *     elif tag == structs.T_CurrentOfExpr:
 */
    break;
    case T_CurrentOfExpr:

    /* "pglast/ast.pyx":2173
 *         return create_SetToDefault(<structs.SetToDefault*> data, offset_to_index)
 *     elif tag == structs.T_CurrentOfExpr:
 *         return create_CurrentOfExpr(<structs.CurrentOfExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_InferenceElem:
 *         return create_InferenceElem(<structs.InferenceElem*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CurrentOfExpr(((CurrentOfExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2172
 *     elif tag == structs.T_SetToDefault:
 *         return create_SetToDefault(<structs.SetToDefault*> data, offset_to_index)
 *     elif tag == structs.T_CurrentOfExpr:             # <<<<<<<<<<<<<<
 *         return create_CurrentOfExpr(<structs.CurrentOfExpr*> data, offset_to_index)
 *     elif tag == structs.T_InferenceElem:
 */
    break;
    case T_InferenceElem:

    /* "pglast/ast.pyx":2175
 *         return create_CurrentOfExpr(<structs.CurrentOfExpr*> data, offset_to_index)
 *     elif tag == structs.T_InferenceElem:
 *         return create_InferenceElem(<structs.InferenceElem*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TargetEntry:
 *         return create_TargetEntry(<structs.TargetEntry*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_InferenceElem(((InferenceElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2174
 *     elif tag == structs.T_CurrentOfExpr:
 *         return create_CurrentOfExpr(<structs.CurrentOfExpr*> data, offset_to_index)
 *     elif tag == structs.T_InferenceElem:             # <<<<<<<<<<<<<<
 *         return create_InferenceElem(<structs.InferenceElem*> data, offset_to_index)
 *     elif tag == structs.T_TargetEntry:
 */
    break;
    case T_TargetEntry:

    /* "pglast/ast.pyx":2177
 *         return create_InferenceElem(<structs.InferenceElem*> data, offset_to_index)
 *     elif tag == structs.T_TargetEntry:
 *         return create_TargetEntry(<structs.TargetEntry*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeTblRef:
 *         return create_RangeTblRef(<structs.RangeTblRef*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TargetEntry(((TargetEntry *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2176
 *     elif tag == structs.T_InferenceElem:
 *         return create_InferenceElem(<structs.InferenceElem*> data, offset_to_index)
 *     elif tag == structs.T_TargetEntry:             # <<<<<<<<<<<<<<
 *         return create_TargetEntry(<structs.TargetEntry*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblRef:
 */
    break;
    case T_RangeTblRef:

    /* "pglast/ast.pyx":2179
 *         return create_TargetEntry(<structs.TargetEntry*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblRef:
 *         return create_RangeTblRef(<structs.RangeTblRef*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JoinExpr:
 *         return create_JoinExpr(<structs.JoinExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeTblRef(((RangeTblRef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2178
 *     elif tag == structs.T_TargetEntry:
 *         return create_TargetEntry(<structs.TargetEntry*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblRef:             # <<<<<<<<<<<<<<
 *         return create_RangeTblRef(<structs.RangeTblRef*> data, offset_to_index)
 *     elif tag == structs.T_JoinExpr:
 */
    break;
    case T_JoinExpr:

    /* "pglast/ast.pyx":2181
 *         return create_RangeTblRef(<structs.RangeTblRef*> data, offset_to_index)
 *     elif tag == structs.T_JoinExpr:
 *         return create_JoinExpr(<structs.JoinExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_FromExpr:
 *         return create_FromExpr(<structs.FromExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JoinExpr(((JoinExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2180
 *     elif tag == structs.T_RangeTblRef:
 *         return create_RangeTblRef(<structs.RangeTblRef*> data, offset_to_index)
 *     elif tag == structs.T_JoinExpr:             # <<<<<<<<<<<<<<
 *         return create_JoinExpr(<structs.JoinExpr*> data, offset_to_index)
 *     elif tag == structs.T_FromExpr:
 */
    break;
    case T_FromExpr:

    /* "pglast/ast.pyx":2183
 *         return create_JoinExpr(<structs.JoinExpr*> data, offset_to_index)
 *     elif tag == structs.T_FromExpr:
 *         return create_FromExpr(<structs.FromExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_OnConflictExpr:
 *         return create_OnConflictExpr(<structs.OnConflictExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_FromExpr(((FromExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2182
 *     elif tag == structs.T_JoinExpr:
 *         return create_JoinExpr(<structs.JoinExpr*> data, offset_to_index)
 *     elif tag == structs.T_FromExpr:             # <<<<<<<<<<<<<<
 *         return create_FromExpr(<structs.FromExpr*> data, offset_to_index)
 *     elif tag == structs.T_OnConflictExpr:
 */
    break;
    case T_OnConflictExpr:

    /* "pglast/ast.pyx":2185
 *         return create_FromExpr(<structs.FromExpr*> data, offset_to_index)
 *     elif tag == structs.T_OnConflictExpr:
 *         return create_OnConflictExpr(<structs.OnConflictExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_IntoClause:
 *         return create_IntoClause(<structs.IntoClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_OnConflictExpr(((OnConflictExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2184
 *     elif tag == structs.T_FromExpr:
 *         return create_FromExpr(<structs.FromExpr*> data, offset_to_index)
 *     elif tag == structs.T_OnConflictExpr:             # <<<<<<<<<<<<<<
 *         return create_OnConflictExpr(<structs.OnConflictExpr*> data, offset_to_index)
 *     elif tag == structs.T_IntoClause:
 */
    break;
    case T_IntoClause:

    /* "pglast/ast.pyx":2187
 *         return create_OnConflictExpr(<structs.OnConflictExpr*> data, offset_to_index)
 *     elif tag == structs.T_IntoClause:
 *         return create_IntoClause(<structs.IntoClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_MergeAction:
 *         return create_MergeAction(<structs.MergeAction*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_IntoClause(((IntoClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2186
 *     elif tag == structs.T_OnConflictExpr:
 *         return create_OnConflictExpr(<structs.OnConflictExpr*> data, offset_to_index)
 *     elif tag == structs.T_IntoClause:             # <<<<<<<<<<<<<<
 *         return create_IntoClause(<structs.IntoClause*> data, offset_to_index)
 *     elif tag == structs.T_MergeAction:
 */
    break;
    case T_MergeAction:

    /* "pglast/ast.pyx":2189
 *         return create_IntoClause(<structs.IntoClause*> data, offset_to_index)
 *     elif tag == structs.T_MergeAction:
 *         return create_MergeAction(<structs.MergeAction*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Integer:
 *         return create_Integer(<structs.Integer*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_MergeAction(((MergeAction *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2188
 *     elif tag == structs.T_IntoClause:
 *         return create_IntoClause(<structs.IntoClause*> data, offset_to_index)
 *     elif tag == structs.T_MergeAction:             # <<<<<<<<<<<<<<
 *         return create_MergeAction(<structs.MergeAction*> data, offset_to_index)
 *     elif tag == structs.T_Integer:
 */
    break;
    case T_Integer:

    /* "pglast/ast.pyx":2191
 *         return create_MergeAction(<structs.MergeAction*> data, offset_to_index)
 *     elif tag == structs.T_Integer:
 *         return create_Integer(<structs.Integer*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Float:
 *         return create_Float(<structs.Float*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Integer(((Integer *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2190
 *     elif tag == structs.T_MergeAction:
 *         return create_MergeAction(<structs.MergeAction*> data, offset_to_index)
 *     elif tag == structs.T_Integer:             # <<<<<<<<<<<<<<
 *         return create_Integer(<structs.Integer*> data, offset_to_index)
 *     elif tag == structs.T_Float:
 */
    break;
    case T_Float:

    /* "pglast/ast.pyx":2193
 *         return create_Integer(<structs.Integer*> data, offset_to_index)
 *     elif tag == structs.T_Float:
 *         return create_Float(<structs.Float*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Boolean:
 *         return create_Boolean(<structs.Boolean*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Float(((Float *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2192
 *     elif tag == structs.T_Integer:
 *         return create_Integer(<structs.Integer*> data, offset_to_index)
 *     elif tag == structs.T_Float:             # <<<<<<<<<<<<<<
 *         return create_Float(<structs.Float*> data, offset_to_index)
 *     elif tag == structs.T_Boolean:
 */
    break;
    case T_Boolean:

    /* "pglast/ast.pyx":2195
 *         return create_Float(<structs.Float*> data, offset_to_index)
 *     elif tag == structs.T_Boolean:
 *         return create_Boolean(<structs.Boolean*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_String:
 *         return create_String(<structs.String*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Boolean(((Boolean *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2194
 *     elif tag == structs.T_Float:
 *         return create_Float(<structs.Float*> data, offset_to_index)
 *     elif tag == structs.T_Boolean:             # <<<<<<<<<<<<<<
 *         return create_Boolean(<structs.Boolean*> data, offset_to_index)
 *     elif tag == structs.T_String:
 */
    break;
    case T_String:

    /* "pglast/ast.pyx":2197
 *         return create_Boolean(<structs.Boolean*> data, offset_to_index)
 *     elif tag == structs.T_String:
 *         return create_String(<structs.String*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_BitString:
 *         return create_BitString(<structs.BitString*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_String(((String *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2196
 *     elif tag == structs.T_Boolean:
 *         return create_Boolean(<structs.Boolean*> data, offset_to_index)
 *     elif tag == structs.T_String:             # <<<<<<<<<<<<<<
 *         return create_String(<structs.String*> data, offset_to_index)
 *     elif tag == structs.T_BitString:
 */
    break;
    case T_BitString:

    /* "pglast/ast.pyx":2199
 *         return create_String(<structs.String*> data, offset_to_index)
 *     elif tag == structs.T_BitString:
 *         return create_BitString(<structs.BitString*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_List:
 *         return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_BitString(((BitString *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2198
 *     elif tag == structs.T_String:
 *         return create_String(<structs.String*> data, offset_to_index)
 *     elif tag == structs.T_BitString:             # <<<<<<<<<<<<<<
 *         return create_BitString(<structs.BitString*> data, offset_to_index)
 *     elif tag == structs.T_List:
 */
    break;
    case T_List:

    /* "pglast/ast.pyx":2201
 *         return create_BitString(<structs.BitString*> data, offset_to_index)
 *     elif tag == structs.T_List:
 *         return _pg_list_to_tuple(<structs.List *> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RawStmt:
 *         return create_RawStmt(<structs.RawStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser__pg_list_to_tuple(((List *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2200
 *     elif tag == structs.T_BitString:
 *         return create_BitString(<structs.BitString*> data, offset_to_index)
 *     elif tag == structs.T_List:             # <<<<<<<<<<<<<<
 *         return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 *     elif tag == structs.T_RawStmt:
 */
    break;
    case T_RawStmt:

    /* "pglast/ast.pyx":2203
 *         return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 *     elif tag == structs.T_RawStmt:
 *         return create_RawStmt(<structs.RawStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Query:
 *         return create_Query(<structs.Query*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RawStmt(((RawStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2202
 *     elif tag == structs.T_List:
 *         return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 *     elif tag == structs.T_RawStmt:             # <<<<<<<<<<<<<<
 *         return create_RawStmt(<structs.RawStmt*> data, offset_to_index)
 *     elif tag == structs.T_Query:
 */
    break;
    case T_Query:

    /* "pglast/ast.pyx":2205
 *         return create_RawStmt(<structs.RawStmt*> data, offset_to_index)
 *     elif tag == structs.T_Query:
 *         return create_Query(<structs.Query*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_InsertStmt:
 *         return create_InsertStmt(<structs.InsertStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Query(((Query *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2204
 *     elif tag == structs.T_RawStmt:
 *         return create_RawStmt(<structs.RawStmt*> data, offset_to_index)
 *     elif tag == structs.T_Query:             # <<<<<<<<<<<<<<
 *         return create_Query(<structs.Query*> data, offset_to_index)
 *     elif tag == structs.T_InsertStmt:
 */
    break;
    case T_InsertStmt:

    /* "pglast/ast.pyx":2207
 *         return create_Query(<structs.Query*> data, offset_to_index)
 *     elif tag == structs.T_InsertStmt:
 *         return create_InsertStmt(<structs.InsertStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DeleteStmt:
 *         return create_DeleteStmt(<structs.DeleteStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_InsertStmt(((InsertStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2206
 *     elif tag == structs.T_Query:
 *         return create_Query(<structs.Query*> data, offset_to_index)
 *     elif tag == structs.T_InsertStmt:             # <<<<<<<<<<<<<<
 *         return create_InsertStmt(<structs.InsertStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeleteStmt:
 */
    break;
    case T_DeleteStmt:

    /* "pglast/ast.pyx":2209
 *         return create_InsertStmt(<structs.InsertStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeleteStmt:
 *         return create_DeleteStmt(<structs.DeleteStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_UpdateStmt:
 *         return create_UpdateStmt(<structs.UpdateStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DeleteStmt(((DeleteStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2208
 *     elif tag == structs.T_InsertStmt:
 *         return create_InsertStmt(<structs.InsertStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeleteStmt:             # <<<<<<<<<<<<<<
 *         return create_DeleteStmt(<structs.DeleteStmt*> data, offset_to_index)
 *     elif tag == structs.T_UpdateStmt:
 */
    break;
    case T_UpdateStmt:

    /* "pglast/ast.pyx":2211
 *         return create_DeleteStmt(<structs.DeleteStmt*> data, offset_to_index)
 *     elif tag == structs.T_UpdateStmt:
 *         return create_UpdateStmt(<structs.UpdateStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_MergeStmt:
 *         return create_MergeStmt(<structs.MergeStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_UpdateStmt(((UpdateStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2210
 *     elif tag == structs.T_DeleteStmt:
 *         return create_DeleteStmt(<structs.DeleteStmt*> data, offset_to_index)
 *     elif tag == structs.T_UpdateStmt:             # <<<<<<<<<<<<<<
 *         return create_UpdateStmt(<structs.UpdateStmt*> data, offset_to_index)
 *     elif tag == structs.T_MergeStmt:
 */
    break;
    case T_MergeStmt:

    /* "pglast/ast.pyx":2213
 *         return create_UpdateStmt(<structs.UpdateStmt*> data, offset_to_index)
 *     elif tag == structs.T_MergeStmt:
 *         return create_MergeStmt(<structs.MergeStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SelectStmt:
 *         return create_SelectStmt(<structs.SelectStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_MergeStmt(((MergeStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2212
 *     elif tag == structs.T_UpdateStmt:
 *         return create_UpdateStmt(<structs.UpdateStmt*> data, offset_to_index)
 *     elif tag == structs.T_MergeStmt:             # <<<<<<<<<<<<<<
 *         return create_MergeStmt(<structs.MergeStmt*> data, offset_to_index)
 *     elif tag == structs.T_SelectStmt:
 */
    break;
    case T_SelectStmt:

    /* "pglast/ast.pyx":2215
 *         return create_MergeStmt(<structs.MergeStmt*> data, offset_to_index)
 *     elif tag == structs.T_SelectStmt:
 *         return create_SelectStmt(<structs.SelectStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ReturnStmt:
 *         return create_ReturnStmt(<structs.ReturnStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SelectStmt(((SelectStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2214
 *     elif tag == structs.T_MergeStmt:
 *         return create_MergeStmt(<structs.MergeStmt*> data, offset_to_index)
 *     elif tag == structs.T_SelectStmt:             # <<<<<<<<<<<<<<
 *         return create_SelectStmt(<structs.SelectStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReturnStmt:
 */
    break;
    case T_ReturnStmt:

    /* "pglast/ast.pyx":2217
 *         return create_SelectStmt(<structs.SelectStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReturnStmt:
 *         return create_ReturnStmt(<structs.ReturnStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PLAssignStmt:
 *         return create_PLAssignStmt(<structs.PLAssignStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ReturnStmt(((ReturnStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2216
 *     elif tag == structs.T_SelectStmt:
 *         return create_SelectStmt(<structs.SelectStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReturnStmt:             # <<<<<<<<<<<<<<
 *         return create_ReturnStmt(<structs.ReturnStmt*> data, offset_to_index)
 *     elif tag == structs.T_PLAssignStmt:
 */
    break;
    case T_PLAssignStmt:

    /* "pglast/ast.pyx":2219
 *         return create_ReturnStmt(<structs.ReturnStmt*> data, offset_to_index)
 *     elif tag == structs.T_PLAssignStmt:
 *         return create_PLAssignStmt(<structs.PLAssignStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterTableStmt:
 *         return create_AlterTableStmt(<structs.AlterTableStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PLAssignStmt(((PLAssignStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2218
 *     elif tag == structs.T_ReturnStmt:
 *         return create_ReturnStmt(<structs.ReturnStmt*> data, offset_to_index)
 *     elif tag == structs.T_PLAssignStmt:             # <<<<<<<<<<<<<<
 *         return create_PLAssignStmt(<structs.PLAssignStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableStmt:
 */
    break;
    case T_AlterTableStmt:

    /* "pglast/ast.pyx":2221
 *         return create_PLAssignStmt(<structs.PLAssignStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableStmt:
 *         return create_AlterTableStmt(<structs.AlterTableStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterTableCmd:
 *         return create_AlterTableCmd(<structs.AlterTableCmd*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterTableStmt(((AlterTableStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2220
 *     elif tag == structs.T_PLAssignStmt:
 *         return create_PLAssignStmt(<structs.PLAssignStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterTableStmt(<structs.AlterTableStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableCmd:
 */
    break;
    case T_AlterTableCmd:

    /* "pglast/ast.pyx":2223
 *         return create_AlterTableStmt(<structs.AlterTableStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableCmd:
 *         return create_AlterTableCmd(<structs.AlterTableCmd*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterDomainStmt:
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterTableCmd(((AlterTableCmd *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2222
 *     elif tag == structs.T_AlterTableStmt:
 *         return create_AlterTableStmt(<structs.AlterTableStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableCmd:             # <<<<<<<<<<<<<<
 *         return create_AlterTableCmd(<structs.AlterTableCmd*> data, offset_to_index)
 *     elif tag == structs.T_AlterDomainStmt:
 */
    break;
    case T_AlterDomainStmt:

    /* "pglast/ast.pyx":2225
 *         return create_AlterTableCmd(<structs.AlterTableCmd*> data, offset_to_index)
 *     elif tag == structs.T_AlterDomainStmt:
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SetOperationStmt:
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterDomainStmt(((AlterDomainStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2224
 *     elif tag == structs.T_AlterTableCmd:
 *         return create_AlterTableCmd(<structs.AlterTableCmd*> data, offset_to_index)
 *     elif tag == structs.T_AlterDomainStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_SetOperationStmt:
 */
    break;
    case T_SetOperationStmt:

    /* "pglast/ast.pyx":2227
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_SetOperationStmt:
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_GrantStmt:
 *         return create_GrantStmt(<structs.GrantStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SetOperationStmt(((SetOperationStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2226
 *     elif tag == structs.T_AlterDomainStmt:
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_SetOperationStmt:             # <<<<<<<<<<<<<<
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantStmt:
 */
    break;
    case T_GrantStmt:

    /* "pglast/ast.pyx":2229
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantStmt:
 *         return create_GrantStmt(<structs.GrantStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_GrantRoleStmt:
 *         return create_GrantRoleStmt(<structs.GrantRoleStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_GrantStmt(((GrantStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2228
 *     elif tag == structs.T_SetOperationStmt:
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantStmt:             # <<<<<<<<<<<<<<
 *         return create_GrantStmt(<structs.GrantStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantRoleStmt:
 */
    break;
    case T_GrantRoleStmt:

    /* "pglast/ast.pyx":2231
 *         return create_GrantStmt(<structs.GrantStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantRoleStmt:
 *         return create_GrantRoleStmt(<structs.GrantRoleStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterDefaultPrivilegesStmt:
 *         return create_AlterDefaultPrivilegesStmt(<structs.AlterDefaultPrivilegesStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_GrantRoleStmt(((GrantRoleStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2230
 *     elif tag == structs.T_GrantStmt:
 *         return create_GrantStmt(<structs.GrantStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantRoleStmt:             # <<<<<<<<<<<<<<
 *         return create_GrantRoleStmt(<structs.GrantRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDefaultPrivilegesStmt:
 */
    break;
    case T_AlterDefaultPrivilegesStmt:

    /* "pglast/ast.pyx":2233
 *         return create_GrantRoleStmt(<structs.GrantRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDefaultPrivilegesStmt:
 *         return create_AlterDefaultPrivilegesStmt(<structs.AlterDefaultPrivilegesStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ClosePortalStmt:
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterDefaultPrivilegesStmt(((AlterDefaultPrivilegesStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2232
 *     elif tag == structs.T_GrantRoleStmt:
 *         return create_GrantRoleStmt(<structs.GrantRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDefaultPrivilegesStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterDefaultPrivilegesStmt(<structs.AlterDefaultPrivilegesStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClosePortalStmt:
 */
    break;
    case T_ClosePortalStmt:

    /* "pglast/ast.pyx":2235
 *         return create_AlterDefaultPrivilegesStmt(<structs.AlterDefaultPrivilegesStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClosePortalStmt:
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ClusterStmt:
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ClosePortalStmt(((ClosePortalStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2234
 *     elif tag == structs.T_AlterDefaultPrivilegesStmt:
 *         return create_AlterDefaultPrivilegesStmt(<structs.AlterDefaultPrivilegesStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClosePortalStmt:             # <<<<<<<<<<<<<<
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClusterStmt:
 */
    break;
    case T_ClusterStmt:

    /* "pglast/ast.pyx":2237
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClusterStmt:
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CopyStmt:
 *         return create_CopyStmt(<structs.CopyStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ClusterStmt(((ClusterStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2236
 *     elif tag == structs.T_ClosePortalStmt:
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClusterStmt:             # <<<<<<<<<<<<<<
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)
 *     elif tag == structs.T_CopyStmt:
 */
    break;
    case T_CopyStmt:

    /* "pglast/ast.pyx":2239
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)
 *     elif tag == structs.T_CopyStmt:
 *         return create_CopyStmt(<structs.CopyStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateStmt:
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CopyStmt(((CopyStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2238
 *     elif tag == structs.T_ClusterStmt:
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)
 *     elif tag == structs.T_CopyStmt:             # <<<<<<<<<<<<<<
 *         return create_CopyStmt(<structs.CopyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStmt:
 */
    break;
    case T_CreateStmt:

    /* "pglast/ast.pyx":2241
 *         return create_CopyStmt(<structs.CopyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStmt:
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DefineStmt:
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateStmt(((CreateStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2240
 *     elif tag == structs.T_CopyStmt:
 *         return create_CopyStmt(<structs.CopyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     elif tag == structs.T_DefineStmt:
 */
    break;
    case T_DefineStmt:

    /* "pglast/ast.pyx":2243
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     elif tag == structs.T_DefineStmt:
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DropStmt:
 *         return create_DropStmt(<structs.DropStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DefineStmt(((DefineStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2242
 *     elif tag == structs.T_CreateStmt:
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     elif tag == structs.T_DefineStmt:             # <<<<<<<<<<<<<<
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropStmt:
 */
    break;
    case T_DropStmt:

    /* "pglast/ast.pyx":2245
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropStmt:
 *         return create_DropStmt(<structs.DropStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TruncateStmt:
 *         return create_TruncateStmt(<structs.TruncateStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DropStmt(((DropStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2244
 *     elif tag == structs.T_DefineStmt:
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropStmt:             # <<<<<<<<<<<<<<
 *         return create_DropStmt(<structs.DropStmt*> data, offset_to_index)
 *     elif tag == structs.T_TruncateStmt:
 */
    break;
    case T_TruncateStmt:

    /* "pglast/ast.pyx":2247
 *         return create_DropStmt(<structs.DropStmt*> data, offset_to_index)
 *     elif tag == structs.T_TruncateStmt:
 *         return create_TruncateStmt(<structs.TruncateStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CommentStmt:
 *         return create_CommentStmt(<structs.CommentStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TruncateStmt(((TruncateStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2246
 *     elif tag == structs.T_DropStmt:
 *         return create_DropStmt(<structs.DropStmt*> data, offset_to_index)
 *     elif tag == structs.T_TruncateStmt:             # <<<<<<<<<<<<<<
 *         return create_TruncateStmt(<structs.TruncateStmt*> data, offset_to_index)
 *     elif tag == structs.T_CommentStmt:
 */
    break;
    case T_CommentStmt:

    /* "pglast/ast.pyx":2249
 *         return create_TruncateStmt(<structs.TruncateStmt*> data, offset_to_index)
 *     elif tag == structs.T_CommentStmt:
 *         return create_CommentStmt(<structs.CommentStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_FetchStmt:
 *         return create_FetchStmt(<structs.FetchStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CommentStmt(((CommentStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2248
 *     elif tag == structs.T_TruncateStmt:
 *         return create_TruncateStmt(<structs.TruncateStmt*> data, offset_to_index)
 *     elif tag == structs.T_CommentStmt:             # <<<<<<<<<<<<<<
 *         return create_CommentStmt(<structs.CommentStmt*> data, offset_to_index)
 *     elif tag == structs.T_FetchStmt:
 */
    break;
    case T_FetchStmt:

    /* "pglast/ast.pyx":2251
 *         return create_CommentStmt(<structs.CommentStmt*> data, offset_to_index)
 *     elif tag == structs.T_FetchStmt:
 *         return create_FetchStmt(<structs.FetchStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_IndexStmt:
 *         return create_IndexStmt(<structs.IndexStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_FetchStmt(((FetchStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2250
 *     elif tag == structs.T_CommentStmt:
 *         return create_CommentStmt(<structs.CommentStmt*> data, offset_to_index)
 *     elif tag == structs.T_FetchStmt:             # <<<<<<<<<<<<<<
 *         return create_FetchStmt(<structs.FetchStmt*> data, offset_to_index)
 *     elif tag == structs.T_IndexStmt:
 */
    break;
    case T_IndexStmt:

    /* "pglast/ast.pyx":2253
 *         return create_FetchStmt(<structs.FetchStmt*> data, offset_to_index)
 *     elif tag == structs.T_IndexStmt:
 *         return create_IndexStmt(<structs.IndexStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateFunctionStmt:
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_IndexStmt(((IndexStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2252
 *     elif tag == structs.T_FetchStmt:
 *         return create_FetchStmt(<structs.FetchStmt*> data, offset_to_index)
 *     elif tag == structs.T_IndexStmt:             # <<<<<<<<<<<<<<
 *         return create_IndexStmt(<structs.IndexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFunctionStmt:
 */
    break;
    case T_CreateFunctionStmt:

    /* "pglast/ast.pyx":2255
 *         return create_IndexStmt(<structs.IndexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFunctionStmt:
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterFunctionStmt:
 *         return create_AlterFunctionStmt(<structs.AlterFunctionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateFunctionStmt(((CreateFunctionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2254
 *     elif tag == structs.T_IndexStmt:
 *         return create_IndexStmt(<structs.IndexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFunctionStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterFunctionStmt:
 */
    break;
    case T_AlterFunctionStmt:

    /* "pglast/ast.pyx":2257
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterFunctionStmt:
 *         return create_AlterFunctionStmt(<structs.AlterFunctionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DoStmt:
 *         return create_DoStmt(<structs.DoStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterFunctionStmt(((AlterFunctionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2256
 *     elif tag == structs.T_CreateFunctionStmt:
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterFunctionStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterFunctionStmt(<structs.AlterFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_DoStmt:
 */
    break;
    case T_DoStmt:

    /* "pglast/ast.pyx":2259
 *         return create_AlterFunctionStmt(<structs.AlterFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_DoStmt:
 *         return create_DoStmt(<structs.DoStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RenameStmt:
 *         return create_RenameStmt(<structs.RenameStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DoStmt(((DoStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2258
 *     elif tag == structs.T_AlterFunctionStmt:
 *         return create_AlterFunctionStmt(<structs.AlterFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_DoStmt:             # <<<<<<<<<<<<<<
 *         return create_DoStmt(<structs.DoStmt*> data, offset_to_index)
 *     elif tag == structs.T_RenameStmt:
 */
    break;
    case T_RenameStmt:

    /* "pglast/ast.pyx":2261
 *         return create_DoStmt(<structs.DoStmt*> data, offset_to_index)
 *     elif tag == structs.T_RenameStmt:
 *         return create_RenameStmt(<structs.RenameStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RuleStmt:
 *         return create_RuleStmt(<structs.RuleStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RenameStmt(((RenameStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2260
 *     elif tag == structs.T_DoStmt:
 *         return create_DoStmt(<structs.DoStmt*> data, offset_to_index)
 *     elif tag == structs.T_RenameStmt:             # <<<<<<<<<<<<<<
 *         return create_RenameStmt(<structs.RenameStmt*> data, offset_to_index)
 *     elif tag == structs.T_RuleStmt:
 */
    break;
    case T_RuleStmt:

    /* "pglast/ast.pyx":2263
 *         return create_RenameStmt(<structs.RenameStmt*> data, offset_to_index)
 *     elif tag == structs.T_RuleStmt:
 *         return create_RuleStmt(<structs.RuleStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_NotifyStmt:
 *         return create_NotifyStmt(<structs.NotifyStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RuleStmt(((RuleStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2262
 *     elif tag == structs.T_RenameStmt:
 *         return create_RenameStmt(<structs.RenameStmt*> data, offset_to_index)
 *     elif tag == structs.T_RuleStmt:             # <<<<<<<<<<<<<<
 *         return create_RuleStmt(<structs.RuleStmt*> data, offset_to_index)
 *     elif tag == structs.T_NotifyStmt:
 */
    break;
    case T_NotifyStmt:

    /* "pglast/ast.pyx":2265
 *         return create_RuleStmt(<structs.RuleStmt*> data, offset_to_index)
 *     elif tag == structs.T_NotifyStmt:
 *         return create_NotifyStmt(<structs.NotifyStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ListenStmt:
 *         return create_ListenStmt(<structs.ListenStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_NotifyStmt(((NotifyStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2264
 *     elif tag == structs.T_RuleStmt:
 *         return create_RuleStmt(<structs.RuleStmt*> data, offset_to_index)
 *     elif tag == structs.T_NotifyStmt:             # <<<<<<<<<<<<<<
 *         return create_NotifyStmt(<structs.NotifyStmt*> data, offset_to_index)
 *     elif tag == structs.T_ListenStmt:
 */
    break;
    case T_ListenStmt:

    /* "pglast/ast.pyx":2267
 *         return create_NotifyStmt(<structs.NotifyStmt*> data, offset_to_index)
 *     elif tag == structs.T_ListenStmt:
 *         return create_ListenStmt(<structs.ListenStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_UnlistenStmt:
 *         return create_UnlistenStmt(<structs.UnlistenStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ListenStmt(((ListenStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2266
 *     elif tag == structs.T_NotifyStmt:
 *         return create_NotifyStmt(<structs.NotifyStmt*> data, offset_to_index)
 *     elif tag == structs.T_ListenStmt:             # <<<<<<<<<<<<<<
 *         return create_ListenStmt(<structs.ListenStmt*> data, offset_to_index)
 *     elif tag == structs.T_UnlistenStmt:
 */
    break;
    case T_UnlistenStmt:

    /* "pglast/ast.pyx":2269
 *         return create_ListenStmt(<structs.ListenStmt*> data, offset_to_index)
 *     elif tag == structs.T_UnlistenStmt:
 *         return create_UnlistenStmt(<structs.UnlistenStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TransactionStmt:
 *         return create_TransactionStmt(<structs.TransactionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_UnlistenStmt(((UnlistenStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2268
 *     elif tag == structs.T_ListenStmt:
 *         return create_ListenStmt(<structs.ListenStmt*> data, offset_to_index)
 *     elif tag == structs.T_UnlistenStmt:             # <<<<<<<<<<<<<<
 *         return create_UnlistenStmt(<structs.UnlistenStmt*> data, offset_to_index)
 *     elif tag == structs.T_TransactionStmt:
 */
    break;
    case T_TransactionStmt:

    /* "pglast/ast.pyx":2271
 *         return create_UnlistenStmt(<structs.UnlistenStmt*> data, offset_to_index)
 *     elif tag == structs.T_TransactionStmt:
 *         return create_TransactionStmt(<structs.TransactionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ViewStmt:
 *         return create_ViewStmt(<structs.ViewStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TransactionStmt(((TransactionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2270
 *     elif tag == structs.T_UnlistenStmt:
 *         return create_UnlistenStmt(<structs.UnlistenStmt*> data, offset_to_index)
 *     elif tag == structs.T_TransactionStmt:             # <<<<<<<<<<<<<<
 *         return create_TransactionStmt(<structs.TransactionStmt*> data, offset_to_index)
 *     elif tag == structs.T_ViewStmt:
 */
    break;
    case T_ViewStmt:

    /* "pglast/ast.pyx":2273
 *         return create_TransactionStmt(<structs.TransactionStmt*> data, offset_to_index)
 *     elif tag == structs.T_ViewStmt:
 *         return create_ViewStmt(<structs.ViewStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_LoadStmt:
 *         return create_LoadStmt(<structs.LoadStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ViewStmt(((ViewStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2272
 *     elif tag == structs.T_TransactionStmt:
 *         return create_TransactionStmt(<structs.TransactionStmt*> data, offset_to_index)
 *     elif tag == structs.T_ViewStmt:             # <<<<<<<<<<<<<<
 *         return create_ViewStmt(<structs.ViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_LoadStmt:
 */
    break;
    case T_LoadStmt:

    /* "pglast/ast.pyx":2275
 *         return create_ViewStmt(<structs.ViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_LoadStmt:
 *         return create_LoadStmt(<structs.LoadStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateDomainStmt:
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_LoadStmt(((LoadStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2274
 *     elif tag == structs.T_ViewStmt:
 *         return create_ViewStmt(<structs.ViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_LoadStmt:             # <<<<<<<<<<<<<<
 *         return create_LoadStmt(<structs.LoadStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateDomainStmt:
 */
    break;
    case T_CreateDomainStmt:

    /* "pglast/ast.pyx":2277
 *         return create_LoadStmt(<structs.LoadStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateDomainStmt:
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreatedbStmt:
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateDomainStmt(((CreateDomainStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2276
 *     elif tag == structs.T_LoadStmt:
 *         return create_LoadStmt(<structs.LoadStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateDomainStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatedbStmt:
 */
    break;
    case T_CreatedbStmt:

    /* "pglast/ast.pyx":2279
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatedbStmt:
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DropdbStmt:
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreatedbStmt(((CreatedbStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2278
 *     elif tag == structs.T_CreateDomainStmt:
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatedbStmt:             # <<<<<<<<<<<<<<
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropdbStmt:
 */
    break;
    case T_DropdbStmt:

    /* "pglast/ast.pyx":2281
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropdbStmt:
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_VacuumStmt:
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DropdbStmt(((DropdbStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2280
 *     elif tag == structs.T_CreatedbStmt:
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropdbStmt:             # <<<<<<<<<<<<<<
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumStmt:
 */
    break;
    case T_VacuumStmt:

    /* "pglast/ast.pyx":2283
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumStmt:
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ExplainStmt:
 *         return create_ExplainStmt(<structs.ExplainStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_VacuumStmt(((VacuumStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2282
 *     elif tag == structs.T_DropdbStmt:
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumStmt:             # <<<<<<<<<<<<<<
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)
 *     elif tag == structs.T_ExplainStmt:
 */
    break;
    case T_ExplainStmt:

    /* "pglast/ast.pyx":2285
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)
 *     elif tag == structs.T_ExplainStmt:
 *         return create_ExplainStmt(<structs.ExplainStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateTableAsStmt:
 *         return create_CreateTableAsStmt(<structs.CreateTableAsStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ExplainStmt(((ExplainStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2284
 *     elif tag == structs.T_VacuumStmt:
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)
 *     elif tag == structs.T_ExplainStmt:             # <<<<<<<<<<<<<<
 *         return create_ExplainStmt(<structs.ExplainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTableAsStmt:
 */
    break;
    case T_CreateTableAsStmt:

    /* "pglast/ast.pyx":2287
 *         return create_ExplainStmt(<structs.ExplainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTableAsStmt:
 *         return create_CreateTableAsStmt(<structs.CreateTableAsStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateSeqStmt:
 *         return create_CreateSeqStmt(<structs.CreateSeqStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateTableAsStmt(((CreateTableAsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2286
 *     elif tag == structs.T_ExplainStmt:
 *         return create_ExplainStmt(<structs.ExplainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTableAsStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateTableAsStmt(<structs.CreateTableAsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSeqStmt:
 */
    break;
    case T_CreateSeqStmt:

    /* "pglast/ast.pyx":2289
 *         return create_CreateTableAsStmt(<structs.CreateTableAsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSeqStmt:
 *         return create_CreateSeqStmt(<structs.CreateSeqStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterSeqStmt:
 *         return create_AlterSeqStmt(<structs.AlterSeqStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateSeqStmt(((CreateSeqStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2288
 *     elif tag == structs.T_CreateTableAsStmt:
 *         return create_CreateTableAsStmt(<structs.CreateTableAsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSeqStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateSeqStmt(<structs.CreateSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSeqStmt:
 */
    break;
    case T_AlterSeqStmt:

    /* "pglast/ast.pyx":2291
 *         return create_CreateSeqStmt(<structs.CreateSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSeqStmt:
 *         return create_AlterSeqStmt(<structs.AlterSeqStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_VariableSetStmt:
 *         return create_VariableSetStmt(<structs.VariableSetStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterSeqStmt(((AlterSeqStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2290
 *     elif tag == structs.T_CreateSeqStmt:
 *         return create_CreateSeqStmt(<structs.CreateSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSeqStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterSeqStmt(<structs.AlterSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_VariableSetStmt:
 */
    break;
    case T_VariableSetStmt:

    /* "pglast/ast.pyx":2293
 *         return create_AlterSeqStmt(<structs.AlterSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_VariableSetStmt:
 *         return create_VariableSetStmt(<structs.VariableSetStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_VariableShowStmt:
 *         return create_VariableShowStmt(<structs.VariableShowStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_VariableSetStmt(((VariableSetStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2292
 *     elif tag == structs.T_AlterSeqStmt:
 *         return create_AlterSeqStmt(<structs.AlterSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_VariableSetStmt:             # <<<<<<<<<<<<<<
 *         return create_VariableSetStmt(<structs.VariableSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_VariableShowStmt:
 */
    break;
    case T_VariableShowStmt:

    /* "pglast/ast.pyx":2295
 *         return create_VariableSetStmt(<structs.VariableSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_VariableShowStmt:
 *         return create_VariableShowStmt(<structs.VariableShowStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DiscardStmt:
 *         return create_DiscardStmt(<structs.DiscardStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_VariableShowStmt(((VariableShowStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2294
 *     elif tag == structs.T_VariableSetStmt:
 *         return create_VariableSetStmt(<structs.VariableSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_VariableShowStmt:             # <<<<<<<<<<<<<<
 *         return create_VariableShowStmt(<structs.VariableShowStmt*> data, offset_to_index)
 *     elif tag == structs.T_DiscardStmt:
 */
    break;
    case T_DiscardStmt:

    /* "pglast/ast.pyx":2297
 *         return create_VariableShowStmt(<structs.VariableShowStmt*> data, offset_to_index)
 *     elif tag == structs.T_DiscardStmt:
 *         return create_DiscardStmt(<structs.DiscardStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateTrigStmt:
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DiscardStmt(((DiscardStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2296
 *     elif tag == structs.T_VariableShowStmt:
 *         return create_VariableShowStmt(<structs.VariableShowStmt*> data, offset_to_index)
 *     elif tag == structs.T_DiscardStmt:             # <<<<<<<<<<<<<<
 *         return create_DiscardStmt(<structs.DiscardStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTrigStmt:
 */
    break;
    case T_CreateTrigStmt:

    /* "pglast/ast.pyx":2299
 *         return create_DiscardStmt(<structs.DiscardStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTrigStmt:
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreatePLangStmt:
 *         return create_CreatePLangStmt(<structs.CreatePLangStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateTrigStmt(((CreateTrigStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2298
 *     elif tag == structs.T_DiscardStmt:
 *         return create_DiscardStmt(<structs.DiscardStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTrigStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePLangStmt:
 */
    break;
    case T_CreatePLangStmt:

    /* "pglast/ast.pyx":2301
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePLangStmt:
 *         return create_CreatePLangStmt(<structs.CreatePLangStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateRoleStmt:
 *         return create_CreateRoleStmt(<structs.CreateRoleStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreatePLangStmt(((CreatePLangStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2300
 *     elif tag == structs.T_CreateTrigStmt:
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePLangStmt:             # <<<<<<<<<<<<<<
 *         return create_CreatePLangStmt(<structs.CreatePLangStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateRoleStmt:
 */
    break;
    case T_CreateRoleStmt:

    /* "pglast/ast.pyx":2303
 *         return create_CreatePLangStmt(<structs.CreatePLangStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateRoleStmt:
 *         return create_CreateRoleStmt(<structs.CreateRoleStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterRoleStmt:
 *         return create_AlterRoleStmt(<structs.AlterRoleStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateRoleStmt(((CreateRoleStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2302
 *     elif tag == structs.T_CreatePLangStmt:
 *         return create_CreatePLangStmt(<structs.CreatePLangStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateRoleStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateRoleStmt(<structs.CreateRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleStmt:
 */
    break;
    case T_AlterRoleStmt:

    /* "pglast/ast.pyx":2305
 *         return create_CreateRoleStmt(<structs.CreateRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleStmt:
 *         return create_AlterRoleStmt(<structs.AlterRoleStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DropRoleStmt:
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterRoleStmt(((AlterRoleStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2304
 *     elif tag == structs.T_CreateRoleStmt:
 *         return create_CreateRoleStmt(<structs.CreateRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterRoleStmt(<structs.AlterRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropRoleStmt:
 */
    break;
    case T_DropRoleStmt:

    /* "pglast/ast.pyx":2307
 *         return create_AlterRoleStmt(<structs.AlterRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropRoleStmt:
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_LockStmt:
 *         return create_LockStmt(<structs.LockStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DropRoleStmt(((DropRoleStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2306
 *     elif tag == structs.T_AlterRoleStmt:
 *         return create_AlterRoleStmt(<structs.AlterRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropRoleStmt:             # <<<<<<<<<<<<<<
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_LockStmt:
 */
    break;
    case T_LockStmt:

    /* "pglast/ast.pyx":2309
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_LockStmt:
 *         return create_LockStmt(<structs.LockStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ConstraintsSetStmt:
 *         return create_ConstraintsSetStmt(<structs.ConstraintsSetStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_LockStmt(((LockStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2308
 *     elif tag == structs.T_DropRoleStmt:
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_LockStmt:             # <<<<<<<<<<<<<<
 *         return create_LockStmt(<structs.LockStmt*> data, offset_to_index)
 *     elif tag == structs.T_ConstraintsSetStmt:
 */
    break;
    case T_ConstraintsSetStmt:

    /* "pglast/ast.pyx":2311
 *         return create_LockStmt(<structs.LockStmt*> data, offset_to_index)
 *     elif tag == structs.T_ConstraintsSetStmt:
 *         return create_ConstraintsSetStmt(<structs.ConstraintsSetStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ReindexStmt:
 *         return create_ReindexStmt(<structs.ReindexStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ConstraintsSetStmt(((ConstraintsSetStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2310
 *     elif tag == structs.T_LockStmt:
 *         return create_LockStmt(<structs.LockStmt*> data, offset_to_index)
 *     elif tag == structs.T_ConstraintsSetStmt:             # <<<<<<<<<<<<<<
 *         return create_ConstraintsSetStmt(<structs.ConstraintsSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReindexStmt:
 */
    break;
    case T_ReindexStmt:

    /* "pglast/ast.pyx":2313
 *         return create_ConstraintsSetStmt(<structs.ConstraintsSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReindexStmt:
 *         return create_ReindexStmt(<structs.ReindexStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CheckPointStmt:
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ReindexStmt(((ReindexStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2312
 *     elif tag == structs.T_ConstraintsSetStmt:
 *         return create_ConstraintsSetStmt(<structs.ConstraintsSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReindexStmt:             # <<<<<<<<<<<<<<
 *         return create_ReindexStmt(<structs.ReindexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CheckPointStmt:
 */
    break;
    case T_CheckPointStmt:

    /* "pglast/ast.pyx":2315
 *         return create_ReindexStmt(<structs.ReindexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CheckPointStmt:
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateSchemaStmt:
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CheckPointStmt(((CheckPointStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2314
 *     elif tag == structs.T_ReindexStmt:
 *         return create_ReindexStmt(<structs.ReindexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CheckPointStmt:             # <<<<<<<<<<<<<<
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSchemaStmt:
 */
    break;
    case T_CreateSchemaStmt:

    /* "pglast/ast.pyx":2317
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSchemaStmt:
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterDatabaseStmt:
 *         return create_AlterDatabaseStmt(<structs.AlterDatabaseStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateSchemaStmt(((CreateSchemaStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2316
 *     elif tag == structs.T_CheckPointStmt:
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSchemaStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseStmt:
 */
    break;
    case T_AlterDatabaseStmt:

    /* "pglast/ast.pyx":2319
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseStmt:
 *         return create_AlterDatabaseStmt(<structs.AlterDatabaseStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterDatabaseRefreshCollStmt:
 *         return create_AlterDatabaseRefreshCollStmt(<structs.AlterDatabaseRefreshCollStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterDatabaseStmt(((AlterDatabaseStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2318
 *     elif tag == structs.T_CreateSchemaStmt:
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterDatabaseStmt(<structs.AlterDatabaseStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseRefreshCollStmt:
 */
    break;
    case T_AlterDatabaseRefreshCollStmt:

    /* "pglast/ast.pyx":2321
 *         return create_AlterDatabaseStmt(<structs.AlterDatabaseStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseRefreshCollStmt:
 *         return create_AlterDatabaseRefreshCollStmt(<structs.AlterDatabaseRefreshCollStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterDatabaseSetStmt:
 *         return create_AlterDatabaseSetStmt(<structs.AlterDatabaseSetStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterDatabaseRefreshCollStmt(((AlterDatabaseRefreshCollStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2320
 *     elif tag == structs.T_AlterDatabaseStmt:
 *         return create_AlterDatabaseStmt(<structs.AlterDatabaseStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseRefreshCollStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterDatabaseRefreshCollStmt(<structs.AlterDatabaseRefreshCollStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseSetStmt:
 */
    break;
    case T_AlterDatabaseSetStmt:

    /* "pglast/ast.pyx":2323
 *         return create_AlterDatabaseRefreshCollStmt(<structs.AlterDatabaseRefreshCollStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseSetStmt:
 *         return create_AlterDatabaseSetStmt(<structs.AlterDatabaseSetStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterRoleSetStmt:
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterDatabaseSetStmt(((AlterDatabaseSetStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2322
 *     elif tag == structs.T_AlterDatabaseRefreshCollStmt:
 *         return create_AlterDatabaseRefreshCollStmt(<structs.AlterDatabaseRefreshCollStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseSetStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterDatabaseSetStmt(<structs.AlterDatabaseSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleSetStmt:
 */
    break;
    case T_AlterRoleSetStmt:

    /* "pglast/ast.pyx":2325
 *         return create_AlterDatabaseSetStmt(<structs.AlterDatabaseSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleSetStmt:
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateConversionStmt:
 *         return create_CreateConversionStmt(<structs.CreateConversionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterRoleSetStmt(((AlterRoleSetStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2324
 *     elif tag == structs.T_AlterDatabaseSetStmt:
 *         return create_AlterDatabaseSetStmt(<structs.AlterDatabaseSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleSetStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateConversionStmt:
 */
    break;
    case T_CreateConversionStmt:

    /* "pglast/ast.pyx":2327
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateConversionStmt:
 *         return create_CreateConversionStmt(<structs.CreateConversionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateCastStmt:
 *         return create_CreateCastStmt(<structs.CreateCastStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateConversionStmt(((CreateConversionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2326
 *     elif tag == structs.T_AlterRoleSetStmt:
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateConversionStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateConversionStmt(<structs.CreateConversionStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateCastStmt:
 */
    break;
    case T_CreateCastStmt:

    /* "pglast/ast.pyx":2329
 *         return create_CreateConversionStmt(<structs.CreateConversionStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateCastStmt:
 *         return create_CreateCastStmt(<structs.CreateCastStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateOpClassStmt:
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateCastStmt(((CreateCastStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2328
 *     elif tag == structs.T_CreateConversionStmt:
 *         return create_CreateConversionStmt(<structs.CreateConversionStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateCastStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateCastStmt(<structs.CreateCastStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassStmt:
 */
    break;
    case T_CreateOpClassStmt:

    /* "pglast/ast.pyx":2331
 *         return create_CreateCastStmt(<structs.CreateCastStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassStmt:
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateOpFamilyStmt:
 *         return create_CreateOpFamilyStmt(<structs.CreateOpFamilyStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateOpClassStmt(((CreateOpClassStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2330
 *     elif tag == structs.T_CreateCastStmt:
 *         return create_CreateCastStmt(<structs.CreateCastStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpFamilyStmt:
 */
    break;
    case T_CreateOpFamilyStmt:

    /* "pglast/ast.pyx":2333
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpFamilyStmt:
 *         return create_CreateOpFamilyStmt(<structs.CreateOpFamilyStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterOpFamilyStmt:
 *         return create_AlterOpFamilyStmt(<structs.AlterOpFamilyStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateOpFamilyStmt(((CreateOpFamilyStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2332
 *     elif tag == structs.T_CreateOpClassStmt:
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpFamilyStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateOpFamilyStmt(<structs.CreateOpFamilyStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOpFamilyStmt:
 */
    break;
    case T_AlterOpFamilyStmt:

    /* "pglast/ast.pyx":2335
 *         return create_CreateOpFamilyStmt(<structs.CreateOpFamilyStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOpFamilyStmt:
 *         return create_AlterOpFamilyStmt(<structs.AlterOpFamilyStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PrepareStmt:
 *         return create_PrepareStmt(<structs.PrepareStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterOpFamilyStmt(((AlterOpFamilyStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2334
 *     elif tag == structs.T_CreateOpFamilyStmt:
 *         return create_CreateOpFamilyStmt(<structs.CreateOpFamilyStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOpFamilyStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterOpFamilyStmt(<structs.AlterOpFamilyStmt*> data, offset_to_index)
 *     elif tag == structs.T_PrepareStmt:
 */
    break;
    case T_PrepareStmt:

    /* "pglast/ast.pyx":2337
 *         return create_AlterOpFamilyStmt(<structs.AlterOpFamilyStmt*> data, offset_to_index)
 *     elif tag == structs.T_PrepareStmt:
 *         return create_PrepareStmt(<structs.PrepareStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ExecuteStmt:
 *         return create_ExecuteStmt(<structs.ExecuteStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PrepareStmt(((PrepareStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2336
 *     elif tag == structs.T_AlterOpFamilyStmt:
 *         return create_AlterOpFamilyStmt(<structs.AlterOpFamilyStmt*> data, offset_to_index)
 *     elif tag == structs.T_PrepareStmt:             # <<<<<<<<<<<<<<
 *         return create_PrepareStmt(<structs.PrepareStmt*> data, offset_to_index)
 *     elif tag == structs.T_ExecuteStmt:
 */
    break;
    case T_ExecuteStmt:

    /* "pglast/ast.pyx":2339
 *         return create_PrepareStmt(<structs.PrepareStmt*> data, offset_to_index)
 *     elif tag == structs.T_ExecuteStmt:
 *         return create_ExecuteStmt(<structs.ExecuteStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DeallocateStmt:
 *         return create_DeallocateStmt(<structs.DeallocateStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ExecuteStmt(((ExecuteStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2338
 *     elif tag == structs.T_PrepareStmt:
 *         return create_PrepareStmt(<structs.PrepareStmt*> data, offset_to_index)
 *     elif tag == structs.T_ExecuteStmt:             # <<<<<<<<<<<<<<
 *         return create_ExecuteStmt(<structs.ExecuteStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeallocateStmt:
 */
    break;
    case T_DeallocateStmt:

    /* "pglast/ast.pyx":2341
 *         return create_ExecuteStmt(<structs.ExecuteStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeallocateStmt:
 *         return create_DeallocateStmt(<structs.DeallocateStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DeclareCursorStmt:
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DeallocateStmt(((DeallocateStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2340
 *     elif tag == structs.T_ExecuteStmt:
 *         return create_ExecuteStmt(<structs.ExecuteStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeallocateStmt:             # <<<<<<<<<<<<<<
 *         return create_DeallocateStmt(<structs.DeallocateStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeclareCursorStmt:
 */
    break;
    case T_DeclareCursorStmt:

    /* "pglast/ast.pyx":2343
 *         return create_DeallocateStmt(<structs.DeallocateStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeclareCursorStmt:
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateTableSpaceStmt:
 *         return create_CreateTableSpaceStmt(<structs.CreateTableSpaceStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DeclareCursorStmt(((DeclareCursorStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2342
 *     elif tag == structs.T_DeallocateStmt:
 *         return create_DeallocateStmt(<structs.DeallocateStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeclareCursorStmt:             # <<<<<<<<<<<<<<
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTableSpaceStmt:
 */
    break;
    case T_CreateTableSpaceStmt:

    /* "pglast/ast.pyx":2345
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTableSpaceStmt:
 *         return create_CreateTableSpaceStmt(<structs.CreateTableSpaceStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DropTableSpaceStmt:
 *         return create_DropTableSpaceStmt(<structs.DropTableSpaceStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateTableSpaceStmt(((CreateTableSpaceStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2344
 *     elif tag == structs.T_DeclareCursorStmt:
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTableSpaceStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateTableSpaceStmt(<structs.CreateTableSpaceStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropTableSpaceStmt:
 */
    break;
    case T_DropTableSpaceStmt:

    /* "pglast/ast.pyx":2347
 *         return create_CreateTableSpaceStmt(<structs.CreateTableSpaceStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropTableSpaceStmt:
 *         return create_DropTableSpaceStmt(<structs.DropTableSpaceStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterObjectDependsStmt:
 *         return create_AlterObjectDependsStmt(<structs.AlterObjectDependsStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DropTableSpaceStmt(((DropTableSpaceStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2346
 *     elif tag == structs.T_CreateTableSpaceStmt:
 *         return create_CreateTableSpaceStmt(<structs.CreateTableSpaceStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropTableSpaceStmt:             # <<<<<<<<<<<<<<
 *         return create_DropTableSpaceStmt(<structs.DropTableSpaceStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterObjectDependsStmt:
 */
    break;
    case T_AlterObjectDependsStmt:

    /* "pglast/ast.pyx":2349
 *         return create_DropTableSpaceStmt(<structs.DropTableSpaceStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterObjectDependsStmt:
 *         return create_AlterObjectDependsStmt(<structs.AlterObjectDependsStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterObjectSchemaStmt:
 *         return create_AlterObjectSchemaStmt(<structs.AlterObjectSchemaStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterObjectDependsStmt(((AlterObjectDependsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2348
 *     elif tag == structs.T_DropTableSpaceStmt:
 *         return create_DropTableSpaceStmt(<structs.DropTableSpaceStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterObjectDependsStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterObjectDependsStmt(<structs.AlterObjectDependsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterObjectSchemaStmt:
 */
    break;
    case T_AlterObjectSchemaStmt:

    /* "pglast/ast.pyx":2351
 *         return create_AlterObjectDependsStmt(<structs.AlterObjectDependsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterObjectSchemaStmt:
 *         return create_AlterObjectSchemaStmt(<structs.AlterObjectSchemaStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterOwnerStmt:
 *         return create_AlterOwnerStmt(<structs.AlterOwnerStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterObjectSchemaStmt(((AlterObjectSchemaStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2350
 *     elif tag == structs.T_AlterObjectDependsStmt:
 *         return create_AlterObjectDependsStmt(<structs.AlterObjectDependsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterObjectSchemaStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterObjectSchemaStmt(<structs.AlterObjectSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOwnerStmt:
 */
    break;
    case T_AlterOwnerStmt:

    /* "pglast/ast.pyx":2353
 *         return create_AlterObjectSchemaStmt(<structs.AlterObjectSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOwnerStmt:
 *         return create_AlterOwnerStmt(<structs.AlterOwnerStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterOperatorStmt:
 *         return create_AlterOperatorStmt(<structs.AlterOperatorStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterOwnerStmt(((AlterOwnerStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2352
 *     elif tag == structs.T_AlterObjectSchemaStmt:
 *         return create_AlterObjectSchemaStmt(<structs.AlterObjectSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOwnerStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterOwnerStmt(<structs.AlterOwnerStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOperatorStmt:
 */
    break;
    case T_AlterOperatorStmt:

    /* "pglast/ast.pyx":2355
 *         return create_AlterOwnerStmt(<structs.AlterOwnerStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOperatorStmt:
 *         return create_AlterOperatorStmt(<structs.AlterOperatorStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterTypeStmt:
 *         return create_AlterTypeStmt(<structs.AlterTypeStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterOperatorStmt(((AlterOperatorStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2354
 *     elif tag == structs.T_AlterOwnerStmt:
 *         return create_AlterOwnerStmt(<structs.AlterOwnerStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterOperatorStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterOperatorStmt(<structs.AlterOperatorStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTypeStmt:
 */
    break;
    case T_AlterTypeStmt:

    /* "pglast/ast.pyx":2357
 *         return create_AlterOperatorStmt(<structs.AlterOperatorStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTypeStmt:
 *         return create_AlterTypeStmt(<structs.AlterTypeStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DropOwnedStmt:
 *         return create_DropOwnedStmt(<structs.DropOwnedStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterTypeStmt(((AlterTypeStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2356
 *     elif tag == structs.T_AlterOperatorStmt:
 *         return create_AlterOperatorStmt(<structs.AlterOperatorStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTypeStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterTypeStmt(<structs.AlterTypeStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropOwnedStmt:
 */
    break;
    case T_DropOwnedStmt:

    /* "pglast/ast.pyx":2359
 *         return create_AlterTypeStmt(<structs.AlterTypeStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropOwnedStmt:
 *         return create_DropOwnedStmt(<structs.DropOwnedStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ReassignOwnedStmt:
 *         return create_ReassignOwnedStmt(<structs.ReassignOwnedStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DropOwnedStmt(((DropOwnedStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2358
 *     elif tag == structs.T_AlterTypeStmt:
 *         return create_AlterTypeStmt(<structs.AlterTypeStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropOwnedStmt:             # <<<<<<<<<<<<<<
 *         return create_DropOwnedStmt(<structs.DropOwnedStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReassignOwnedStmt:
 */
    break;
    case T_ReassignOwnedStmt:

    /* "pglast/ast.pyx":2361
 *         return create_DropOwnedStmt(<structs.DropOwnedStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReassignOwnedStmt:
 *         return create_ReassignOwnedStmt(<structs.ReassignOwnedStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CompositeTypeStmt:
 *         return create_CompositeTypeStmt(<structs.CompositeTypeStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ReassignOwnedStmt(((ReassignOwnedStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2360
 *     elif tag == structs.T_DropOwnedStmt:
 *         return create_DropOwnedStmt(<structs.DropOwnedStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReassignOwnedStmt:             # <<<<<<<<<<<<<<
 *         return create_ReassignOwnedStmt(<structs.ReassignOwnedStmt*> data, offset_to_index)
 *     elif tag == structs.T_CompositeTypeStmt:
 */
    break;
    case T_CompositeTypeStmt:

    /* "pglast/ast.pyx":2363
 *         return create_ReassignOwnedStmt(<structs.ReassignOwnedStmt*> data, offset_to_index)
 *     elif tag == structs.T_CompositeTypeStmt:
 *         return create_CompositeTypeStmt(<structs.CompositeTypeStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateEnumStmt:
 *         return create_CreateEnumStmt(<structs.CreateEnumStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CompositeTypeStmt(((CompositeTypeStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2362
 *     elif tag == structs.T_ReassignOwnedStmt:
 *         return create_ReassignOwnedStmt(<structs.ReassignOwnedStmt*> data, offset_to_index)
 *     elif tag == structs.T_CompositeTypeStmt:             # <<<<<<<<<<<<<<
 *         return create_CompositeTypeStmt(<structs.CompositeTypeStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateEnumStmt:
 */
    break;
    case T_CreateEnumStmt:

    /* "pglast/ast.pyx":2365
 *         return create_CompositeTypeStmt(<structs.CompositeTypeStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateEnumStmt:
 *         return create_CreateEnumStmt(<structs.CreateEnumStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateRangeStmt:
 *         return create_CreateRangeStmt(<structs.CreateRangeStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateEnumStmt(((CreateEnumStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2364
 *     elif tag == structs.T_CompositeTypeStmt:
 *         return create_CompositeTypeStmt(<structs.CompositeTypeStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateEnumStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateEnumStmt(<structs.CreateEnumStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateRangeStmt:
 */
    break;
    case T_CreateRangeStmt:

    /* "pglast/ast.pyx":2367
 *         return create_CreateEnumStmt(<structs.CreateEnumStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateRangeStmt:
 *         return create_CreateRangeStmt(<structs.CreateRangeStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterEnumStmt:
 *         return create_AlterEnumStmt(<structs.AlterEnumStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateRangeStmt(((CreateRangeStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2366
 *     elif tag == structs.T_CreateEnumStmt:
 *         return create_CreateEnumStmt(<structs.CreateEnumStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateRangeStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateRangeStmt(<structs.CreateRangeStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterEnumStmt:
 */
    break;
    case T_AlterEnumStmt:

    /* "pglast/ast.pyx":2369
 *         return create_CreateRangeStmt(<structs.CreateRangeStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterEnumStmt:
 *         return create_AlterEnumStmt(<structs.AlterEnumStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterTSDictionaryStmt:
 *         return create_AlterTSDictionaryStmt(<structs.AlterTSDictionaryStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterEnumStmt(((AlterEnumStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2368
 *     elif tag == structs.T_CreateRangeStmt:
 *         return create_CreateRangeStmt(<structs.CreateRangeStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterEnumStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterEnumStmt(<structs.AlterEnumStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTSDictionaryStmt:
 */
    break;
    case T_AlterTSDictionaryStmt:

    /* "pglast/ast.pyx":2371
 *         return create_AlterEnumStmt(<structs.AlterEnumStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTSDictionaryStmt:
 *         return create_AlterTSDictionaryStmt(<structs.AlterTSDictionaryStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterTSConfigurationStmt:
 *         return create_AlterTSConfigurationStmt(<structs.AlterTSConfigurationStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterTSDictionaryStmt(((AlterTSDictionaryStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2370
 *     elif tag == structs.T_AlterEnumStmt:
 *         return create_AlterEnumStmt(<structs.AlterEnumStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTSDictionaryStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterTSDictionaryStmt(<structs.AlterTSDictionaryStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTSConfigurationStmt:
 */
    break;
    case T_AlterTSConfigurationStmt:

    /* "pglast/ast.pyx":2373
 *         return create_AlterTSDictionaryStmt(<structs.AlterTSDictionaryStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTSConfigurationStmt:
 *         return create_AlterTSConfigurationStmt(<structs.AlterTSConfigurationStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateFdwStmt:
 *         return create_CreateFdwStmt(<structs.CreateFdwStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterTSConfigurationStmt(((AlterTSConfigurationStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2372
 *     elif tag == structs.T_AlterTSDictionaryStmt:
 *         return create_AlterTSDictionaryStmt(<structs.AlterTSDictionaryStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTSConfigurationStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterTSConfigurationStmt(<structs.AlterTSConfigurationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFdwStmt:
 */
    break;
    case T_CreateFdwStmt:

    /* "pglast/ast.pyx":2375
 *         return create_AlterTSConfigurationStmt(<structs.AlterTSConfigurationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFdwStmt:
 *         return create_CreateFdwStmt(<structs.CreateFdwStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterFdwStmt:
 *         return create_AlterFdwStmt(<structs.AlterFdwStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateFdwStmt(((CreateFdwStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2374
 *     elif tag == structs.T_AlterTSConfigurationStmt:
 *         return create_AlterTSConfigurationStmt(<structs.AlterTSConfigurationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFdwStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateFdwStmt(<structs.CreateFdwStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterFdwStmt:
 */
    break;
    case T_AlterFdwStmt:

    /* "pglast/ast.pyx":2377
 *         return create_CreateFdwStmt(<structs.CreateFdwStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterFdwStmt:
 *         return create_AlterFdwStmt(<structs.AlterFdwStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateForeignServerStmt:
 *         return create_CreateForeignServerStmt(<structs.CreateForeignServerStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterFdwStmt(((AlterFdwStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2376
 *     elif tag == structs.T_CreateFdwStmt:
 *         return create_CreateFdwStmt(<structs.CreateFdwStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterFdwStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterFdwStmt(<structs.AlterFdwStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignServerStmt:
 */
    break;
    case T_CreateForeignServerStmt:

    /* "pglast/ast.pyx":2379
 *         return create_AlterFdwStmt(<structs.AlterFdwStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignServerStmt:
 *         return create_CreateForeignServerStmt(<structs.CreateForeignServerStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterForeignServerStmt:
 *         return create_AlterForeignServerStmt(<structs.AlterForeignServerStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateForeignServerStmt(((CreateForeignServerStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2378
 *     elif tag == structs.T_AlterFdwStmt:
 *         return create_AlterFdwStmt(<structs.AlterFdwStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignServerStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateForeignServerStmt(<structs.CreateForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterForeignServerStmt:
 */
    break;
    case T_AlterForeignServerStmt:

    /* "pglast/ast.pyx":2381
 *         return create_CreateForeignServerStmt(<structs.CreateForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterForeignServerStmt:
 *         return create_AlterForeignServerStmt(<structs.AlterForeignServerStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateUserMappingStmt:
 *         return create_CreateUserMappingStmt(<structs.CreateUserMappingStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterForeignServerStmt(((AlterForeignServerStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2380
 *     elif tag == structs.T_CreateForeignServerStmt:
 *         return create_CreateForeignServerStmt(<structs.CreateForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterForeignServerStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterForeignServerStmt(<structs.AlterForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateUserMappingStmt:
 */
    break;
    case T_CreateUserMappingStmt:

    /* "pglast/ast.pyx":2383
 *         return create_AlterForeignServerStmt(<structs.AlterForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateUserMappingStmt:
 *         return create_CreateUserMappingStmt(<structs.CreateUserMappingStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterUserMappingStmt:
 *         return create_AlterUserMappingStmt(<structs.AlterUserMappingStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateUserMappingStmt(((CreateUserMappingStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2382
 *     elif tag == structs.T_AlterForeignServerStmt:
 *         return create_AlterForeignServerStmt(<structs.AlterForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateUserMappingStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateUserMappingStmt(<structs.CreateUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterUserMappingStmt:
 */
    break;
    case T_AlterUserMappingStmt:

    /* "pglast/ast.pyx":2385
 *         return create_CreateUserMappingStmt(<structs.CreateUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterUserMappingStmt:
 *         return create_AlterUserMappingStmt(<structs.AlterUserMappingStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DropUserMappingStmt:
 *         return create_DropUserMappingStmt(<structs.DropUserMappingStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterUserMappingStmt(((AlterUserMappingStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2384
 *     elif tag == structs.T_CreateUserMappingStmt:
 *         return create_CreateUserMappingStmt(<structs.CreateUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterUserMappingStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterUserMappingStmt(<structs.AlterUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropUserMappingStmt:
 */
    break;
    case T_DropUserMappingStmt:

    /* "pglast/ast.pyx":2387
 *         return create_AlterUserMappingStmt(<structs.AlterUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropUserMappingStmt:
 *         return create_DropUserMappingStmt(<structs.DropUserMappingStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterTableSpaceOptionsStmt:
 *         return create_AlterTableSpaceOptionsStmt(<structs.AlterTableSpaceOptionsStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DropUserMappingStmt(((DropUserMappingStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2386
 *     elif tag == structs.T_AlterUserMappingStmt:
 *         return create_AlterUserMappingStmt(<structs.AlterUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropUserMappingStmt:             # <<<<<<<<<<<<<<
 *         return create_DropUserMappingStmt(<structs.DropUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableSpaceOptionsStmt:
 */
    break;
    case T_AlterTableSpaceOptionsStmt:

    /* "pglast/ast.pyx":2389
 *         return create_DropUserMappingStmt(<structs.DropUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableSpaceOptionsStmt:
 *         return create_AlterTableSpaceOptionsStmt(<structs.AlterTableSpaceOptionsStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterTableMoveAllStmt:
 *         return create_AlterTableMoveAllStmt(<structs.AlterTableMoveAllStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterTableSpaceOptionsStmt(((AlterTableSpaceOptionsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2388
 *     elif tag == structs.T_DropUserMappingStmt:
 *         return create_DropUserMappingStmt(<structs.DropUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableSpaceOptionsStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterTableSpaceOptionsStmt(<structs.AlterTableSpaceOptionsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableMoveAllStmt:
 */
    break;
    case T_AlterTableMoveAllStmt:

    /* "pglast/ast.pyx":2391
 *         return create_AlterTableSpaceOptionsStmt(<structs.AlterTableSpaceOptionsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableMoveAllStmt:
 *         return create_AlterTableMoveAllStmt(<structs.AlterTableMoveAllStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SecLabelStmt:
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterTableMoveAllStmt(((AlterTableMoveAllStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2390
 *     elif tag == structs.T_AlterTableSpaceOptionsStmt:
 *         return create_AlterTableSpaceOptionsStmt(<structs.AlterTableSpaceOptionsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableMoveAllStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterTableMoveAllStmt(<structs.AlterTableMoveAllStmt*> data, offset_to_index)
 *     elif tag == structs.T_SecLabelStmt:
 */
    break;
    case T_SecLabelStmt:

    /* "pglast/ast.pyx":2393
 *         return create_AlterTableMoveAllStmt(<structs.AlterTableMoveAllStmt*> data, offset_to_index)
 *     elif tag == structs.T_SecLabelStmt:
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateForeignTableStmt:
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SecLabelStmt(((SecLabelStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2392
 *     elif tag == structs.T_AlterTableMoveAllStmt:
 *         return create_AlterTableMoveAllStmt(<structs.AlterTableMoveAllStmt*> data, offset_to_index)
 *     elif tag == structs.T_SecLabelStmt:             # <<<<<<<<<<<<<<
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignTableStmt:
 */
    break;
    case T_CreateForeignTableStmt:

    /* "pglast/ast.pyx":2395
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignTableStmt:
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ImportForeignSchemaStmt:
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateForeignTableStmt(((CreateForeignTableStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2394
 *     elif tag == structs.T_SecLabelStmt:
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignTableStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> data, offset_to_index)
 *     elif tag == structs.T_ImportForeignSchemaStmt:
 */
    break;
    case T_ImportForeignSchemaStmt:

    /* "pglast/ast.pyx":2397
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> data, offset_to_index)
 *     elif tag == structs.T_ImportForeignSchemaStmt:
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateExtensionStmt:
 *         return create_CreateExtensionStmt(<structs.CreateExtensionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ImportForeignSchemaStmt(((ImportForeignSchemaStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2396
 *     elif tag == structs.T_CreateForeignTableStmt:
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> data, offset_to_index)
 *     elif tag == structs.T_ImportForeignSchemaStmt:             # <<<<<<<<<<<<<<
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateExtensionStmt:
 */
    break;
    case T_CreateExtensionStmt:

    /* "pglast/ast.pyx":2399
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateExtensionStmt:
 *         return create_CreateExtensionStmt(<structs.CreateExtensionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterExtensionStmt:
 *         return create_AlterExtensionStmt(<structs.AlterExtensionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateExtensionStmt(((CreateExtensionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2398
 *     elif tag == structs.T_ImportForeignSchemaStmt:
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateExtensionStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateExtensionStmt(<structs.CreateExtensionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterExtensionStmt:
 */
    break;
    case T_AlterExtensionStmt:

    /* "pglast/ast.pyx":2401
 *         return create_CreateExtensionStmt(<structs.CreateExtensionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterExtensionStmt:
 *         return create_AlterExtensionStmt(<structs.AlterExtensionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterExtensionContentsStmt:
 *         return create_AlterExtensionContentsStmt(<structs.AlterExtensionContentsStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterExtensionStmt(((AlterExtensionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2400
 *     elif tag == structs.T_CreateExtensionStmt:
 *         return create_CreateExtensionStmt(<structs.CreateExtensionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterExtensionStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterExtensionStmt(<structs.AlterExtensionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterExtensionContentsStmt:
 */
    break;
    case T_AlterExtensionContentsStmt:

    /* "pglast/ast.pyx":2403
 *         return create_AlterExtensionStmt(<structs.AlterExtensionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterExtensionContentsStmt:
 *         return create_AlterExtensionContentsStmt(<structs.AlterExtensionContentsStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateEventTrigStmt:
 *         return create_CreateEventTrigStmt(<structs.CreateEventTrigStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterExtensionContentsStmt(((AlterExtensionContentsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2402
 *     elif tag == structs.T_AlterExtensionStmt:
 *         return create_AlterExtensionStmt(<structs.AlterExtensionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterExtensionContentsStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterExtensionContentsStmt(<structs.AlterExtensionContentsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateEventTrigStmt:
 */
    break;
    case T_CreateEventTrigStmt:

    /* "pglast/ast.pyx":2405
 *         return create_AlterExtensionContentsStmt(<structs.AlterExtensionContentsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateEventTrigStmt:
 *         return create_CreateEventTrigStmt(<structs.CreateEventTrigStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterEventTrigStmt:
 *         return create_AlterEventTrigStmt(<structs.AlterEventTrigStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateEventTrigStmt(((CreateEventTrigStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2404
 *     elif tag == structs.T_AlterExtensionContentsStmt:
 *         return create_AlterExtensionContentsStmt(<structs.AlterExtensionContentsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateEventTrigStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateEventTrigStmt(<structs.CreateEventTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterEventTrigStmt:
 */
    break;
    case T_AlterEventTrigStmt:

    /* "pglast/ast.pyx":2407
 *         return create_CreateEventTrigStmt(<structs.CreateEventTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterEventTrigStmt:
 *         return create_AlterEventTrigStmt(<structs.AlterEventTrigStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RefreshMatViewStmt:
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterEventTrigStmt(((AlterEventTrigStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2406
 *     elif tag == structs.T_CreateEventTrigStmt:
 *         return create_CreateEventTrigStmt(<structs.CreateEventTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterEventTrigStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterEventTrigStmt(<structs.AlterEventTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_RefreshMatViewStmt:
 */
    break;
    case T_RefreshMatViewStmt:

    /* "pglast/ast.pyx":2409
 *         return create_AlterEventTrigStmt(<structs.AlterEventTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_RefreshMatViewStmt:
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ReplicaIdentityStmt:
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RefreshMatViewStmt(((RefreshMatViewStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2408
 *     elif tag == structs.T_AlterEventTrigStmt:
 *         return create_AlterEventTrigStmt(<structs.AlterEventTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_RefreshMatViewStmt:             # <<<<<<<<<<<<<<
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReplicaIdentityStmt:
 */
    break;
    case T_ReplicaIdentityStmt:

    /* "pglast/ast.pyx":2411
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReplicaIdentityStmt:
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterSystemStmt:
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ReplicaIdentityStmt(((ReplicaIdentityStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2410
 *     elif tag == structs.T_RefreshMatViewStmt:
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReplicaIdentityStmt:             # <<<<<<<<<<<<<<
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSystemStmt:
 */
    break;
    case T_AlterSystemStmt:

    /* "pglast/ast.pyx":2413
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSystemStmt:
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreatePolicyStmt:
 *         return create_CreatePolicyStmt(<structs.CreatePolicyStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterSystemStmt(((AlterSystemStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2412
 *     elif tag == structs.T_ReplicaIdentityStmt:
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSystemStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePolicyStmt:
 */
    break;
    case T_CreatePolicyStmt:

    /* "pglast/ast.pyx":2415
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePolicyStmt:
 *         return create_CreatePolicyStmt(<structs.CreatePolicyStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterPolicyStmt:
 *         return create_AlterPolicyStmt(<structs.AlterPolicyStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreatePolicyStmt(((CreatePolicyStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2414
 *     elif tag == structs.T_AlterSystemStmt:
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePolicyStmt:             # <<<<<<<<<<<<<<
 *         return create_CreatePolicyStmt(<structs.CreatePolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterPolicyStmt:
 */
    break;
    case T_AlterPolicyStmt:

    /* "pglast/ast.pyx":2417
 *         return create_CreatePolicyStmt(<structs.CreatePolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterPolicyStmt:
 *         return create_AlterPolicyStmt(<structs.AlterPolicyStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateTransformStmt:
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterPolicyStmt(((AlterPolicyStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2416
 *     elif tag == structs.T_CreatePolicyStmt:
 *         return create_CreatePolicyStmt(<structs.CreatePolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterPolicyStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterPolicyStmt(<structs.AlterPolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTransformStmt:
 */
    break;
    case T_CreateTransformStmt:

    /* "pglast/ast.pyx":2419
 *         return create_AlterPolicyStmt(<structs.AlterPolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTransformStmt:
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateAmStmt:
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateTransformStmt(((CreateTransformStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2418
 *     elif tag == structs.T_AlterPolicyStmt:
 *         return create_AlterPolicyStmt(<structs.AlterPolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTransformStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateAmStmt:
 */
    break;
    case T_CreateAmStmt:

    /* "pglast/ast.pyx":2421
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateAmStmt:
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreatePublicationStmt:
 *         return create_CreatePublicationStmt(<structs.CreatePublicationStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateAmStmt(((CreateAmStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2420
 *     elif tag == structs.T_CreateTransformStmt:
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateAmStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePublicationStmt:
 */
    break;
    case T_CreatePublicationStmt:

    /* "pglast/ast.pyx":2423
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePublicationStmt:
 *         return create_CreatePublicationStmt(<structs.CreatePublicationStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterPublicationStmt:
 *         return create_AlterPublicationStmt(<structs.AlterPublicationStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreatePublicationStmt(((CreatePublicationStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2422
 *     elif tag == structs.T_CreateAmStmt:
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePublicationStmt:             # <<<<<<<<<<<<<<
 *         return create_CreatePublicationStmt(<structs.CreatePublicationStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterPublicationStmt:
 */
    break;
    case T_AlterPublicationStmt:

    /* "pglast/ast.pyx":2425
 *         return create_CreatePublicationStmt(<structs.CreatePublicationStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterPublicationStmt:
 *         return create_AlterPublicationStmt(<structs.AlterPublicationStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateSubscriptionStmt:
 *         return create_CreateSubscriptionStmt(<structs.CreateSubscriptionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterPublicationStmt(((AlterPublicationStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2424
 *     elif tag == structs.T_CreatePublicationStmt:
 *         return create_CreatePublicationStmt(<structs.CreatePublicationStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterPublicationStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterPublicationStmt(<structs.AlterPublicationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSubscriptionStmt:
 */
    break;
    case T_CreateSubscriptionStmt:

    /* "pglast/ast.pyx":2427
 *         return create_AlterPublicationStmt(<structs.AlterPublicationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSubscriptionStmt:
 *         return create_CreateSubscriptionStmt(<structs.CreateSubscriptionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterSubscriptionStmt:
 *         return create_AlterSubscriptionStmt(<structs.AlterSubscriptionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateSubscriptionStmt(((CreateSubscriptionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2426
 *     elif tag == structs.T_AlterPublicationStmt:
 *         return create_AlterPublicationStmt(<structs.AlterPublicationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSubscriptionStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateSubscriptionStmt(<structs.CreateSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSubscriptionStmt:
 */
    break;
    case T_AlterSubscriptionStmt:

    /* "pglast/ast.pyx":2429
 *         return create_CreateSubscriptionStmt(<structs.CreateSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSubscriptionStmt:
 *         return create_AlterSubscriptionStmt(<structs.AlterSubscriptionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DropSubscriptionStmt:
 *         return create_DropSubscriptionStmt(<structs.DropSubscriptionStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterSubscriptionStmt(((AlterSubscriptionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2428
 *     elif tag == structs.T_CreateSubscriptionStmt:
 *         return create_CreateSubscriptionStmt(<structs.CreateSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSubscriptionStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterSubscriptionStmt(<structs.AlterSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropSubscriptionStmt:
 */
    break;
    case T_DropSubscriptionStmt:

    /* "pglast/ast.pyx":2431
 *         return create_AlterSubscriptionStmt(<structs.AlterSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropSubscriptionStmt:
 *         return create_DropSubscriptionStmt(<structs.DropSubscriptionStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateStatsStmt:
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DropSubscriptionStmt(((DropSubscriptionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2430
 *     elif tag == structs.T_AlterSubscriptionStmt:
 *         return create_AlterSubscriptionStmt(<structs.AlterSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropSubscriptionStmt:             # <<<<<<<<<<<<<<
 *         return create_DropSubscriptionStmt(<structs.DropSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStatsStmt:
 */
    break;
    case T_CreateStatsStmt:

    /* "pglast/ast.pyx":2433
 *         return create_DropSubscriptionStmt(<structs.DropSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStatsStmt:
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterCollationStmt:
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateStatsStmt(((CreateStatsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2432
 *     elif tag == structs.T_DropSubscriptionStmt:
 *         return create_DropSubscriptionStmt(<structs.DropSubscriptionStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStatsStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterCollationStmt:
 */
    break;
    case T_AlterCollationStmt:

    /* "pglast/ast.pyx":2435
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterCollationStmt:
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CallStmt:
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterCollationStmt(((AlterCollationStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2434
 *     elif tag == structs.T_CreateStatsStmt:
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterCollationStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CallStmt:
 */
    break;
    case T_CallStmt:

    /* "pglast/ast.pyx":2437
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CallStmt:
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AlterStatsStmt:
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CallStmt(((CallStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2436
 *     elif tag == structs.T_AlterCollationStmt:
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)
 *     elif tag == structs.T_CallStmt:             # <<<<<<<<<<<<<<
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterStatsStmt:
 */
    break;
    case T_AlterStatsStmt:

    /* "pglast/ast.pyx":2439
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterStatsStmt:
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_A_Expr:
 *         return create_A_Expr(<structs.A_Expr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AlterStatsStmt(((AlterStatsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2438
 *     elif tag == structs.T_CallStmt:
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterStatsStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_A_Expr:
 */
    break;
    case T_A_Expr:

    /* "pglast/ast.pyx":2441
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_A_Expr:
 *         return create_A_Expr(<structs.A_Expr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ColumnRef:
 *         return create_ColumnRef(<structs.ColumnRef*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_A_Expr(((A_Expr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2440
 *     elif tag == structs.T_AlterStatsStmt:
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_A_Expr:             # <<<<<<<<<<<<<<
 *         return create_A_Expr(<structs.A_Expr*> data, offset_to_index)
 *     elif tag == structs.T_ColumnRef:
 */
    break;
    case T_ColumnRef:

    /* "pglast/ast.pyx":2443
 *         return create_A_Expr(<structs.A_Expr*> data, offset_to_index)
 *     elif tag == structs.T_ColumnRef:
 *         return create_ColumnRef(<structs.ColumnRef*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ParamRef:
 *         return create_ParamRef(<structs.ParamRef*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ColumnRef(((ColumnRef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2442
 *     elif tag == structs.T_A_Expr:
 *         return create_A_Expr(<structs.A_Expr*> data, offset_to_index)
 *     elif tag == structs.T_ColumnRef:             # <<<<<<<<<<<<<<
 *         return create_ColumnRef(<structs.ColumnRef*> data, offset_to_index)
 *     elif tag == structs.T_ParamRef:
 */
    break;
    case T_ParamRef:

    /* "pglast/ast.pyx":2445
 *         return create_ColumnRef(<structs.ColumnRef*> data, offset_to_index)
 *     elif tag == structs.T_ParamRef:
 *         return create_ParamRef(<structs.ParamRef*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_A_Const:
 *         return create_A_Const(<structs.A_Const*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ParamRef(((ParamRef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2444
 *     elif tag == structs.T_ColumnRef:
 *         return create_ColumnRef(<structs.ColumnRef*> data, offset_to_index)
 *     elif tag == structs.T_ParamRef:             # <<<<<<<<<<<<<<
 *         return create_ParamRef(<structs.ParamRef*> data, offset_to_index)
 *     elif tag == structs.T_A_Const:
 */
    break;
    case T_A_Const:

    /* "pglast/ast.pyx":2447
 *         return create_ParamRef(<structs.ParamRef*> data, offset_to_index)
 *     elif tag == structs.T_A_Const:
 *         return create_A_Const(<structs.A_Const*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_FuncCall:
 *         return create_FuncCall(<structs.FuncCall*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_A_Const(((A_Const *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2446
 *     elif tag == structs.T_ParamRef:
 *         return create_ParamRef(<structs.ParamRef*> data, offset_to_index)
 *     elif tag == structs.T_A_Const:             # <<<<<<<<<<<<<<
 *         return create_A_Const(<structs.A_Const*> data, offset_to_index)
 *     elif tag == structs.T_FuncCall:
 */
    break;
    case T_FuncCall:

    /* "pglast/ast.pyx":2449
 *         return create_A_Const(<structs.A_Const*> data, offset_to_index)
 *     elif tag == structs.T_FuncCall:
 *         return create_FuncCall(<structs.FuncCall*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_A_Star:
 *         return create_A_Star(<structs.A_Star*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_FuncCall(((FuncCall *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2448
 *     elif tag == structs.T_A_Const:
 *         return create_A_Const(<structs.A_Const*> data, offset_to_index)
 *     elif tag == structs.T_FuncCall:             # <<<<<<<<<<<<<<
 *         return create_FuncCall(<structs.FuncCall*> data, offset_to_index)
 *     elif tag == structs.T_A_Star:
 */
    break;
    case T_A_Star:

    /* "pglast/ast.pyx":2451
 *         return create_FuncCall(<structs.FuncCall*> data, offset_to_index)
 *     elif tag == structs.T_A_Star:
 *         return create_A_Star(<structs.A_Star*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_A_Indices:
 *         return create_A_Indices(<structs.A_Indices*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_A_Star(((A_Star *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2450
 *     elif tag == structs.T_FuncCall:
 *         return create_FuncCall(<structs.FuncCall*> data, offset_to_index)
 *     elif tag == structs.T_A_Star:             # <<<<<<<<<<<<<<
 *         return create_A_Star(<structs.A_Star*> data, offset_to_index)
 *     elif tag == structs.T_A_Indices:
 */
    break;
    case T_A_Indices:

    /* "pglast/ast.pyx":2453
 *         return create_A_Star(<structs.A_Star*> data, offset_to_index)
 *     elif tag == structs.T_A_Indices:
 *         return create_A_Indices(<structs.A_Indices*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_A_Indirection:
 *         return create_A_Indirection(<structs.A_Indirection*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_A_Indices(((A_Indices *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2452
 *     elif tag == structs.T_A_Star:
 *         return create_A_Star(<structs.A_Star*> data, offset_to_index)
 *     elif tag == structs.T_A_Indices:             # <<<<<<<<<<<<<<
 *         return create_A_Indices(<structs.A_Indices*> data, offset_to_index)
 *     elif tag == structs.T_A_Indirection:
 */
    break;
    case T_A_Indirection:

    /* "pglast/ast.pyx":2455
 *         return create_A_Indices(<structs.A_Indices*> data, offset_to_index)
 *     elif tag == structs.T_A_Indirection:
 *         return create_A_Indirection(<structs.A_Indirection*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_A_ArrayExpr:
 *         return create_A_ArrayExpr(<structs.A_ArrayExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_A_Indirection(((A_Indirection *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2454
 *     elif tag == structs.T_A_Indices:
 *         return create_A_Indices(<structs.A_Indices*> data, offset_to_index)
 *     elif tag == structs.T_A_Indirection:             # <<<<<<<<<<<<<<
 *         return create_A_Indirection(<structs.A_Indirection*> data, offset_to_index)
 *     elif tag == structs.T_A_ArrayExpr:
 */
    break;
    case T_A_ArrayExpr:

    /* "pglast/ast.pyx":2457
 *         return create_A_Indirection(<structs.A_Indirection*> data, offset_to_index)
 *     elif tag == structs.T_A_ArrayExpr:
 *         return create_A_ArrayExpr(<structs.A_ArrayExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ResTarget:
 *         return create_ResTarget(<structs.ResTarget*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_A_ArrayExpr(((A_ArrayExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2456
 *     elif tag == structs.T_A_Indirection:
 *         return create_A_Indirection(<structs.A_Indirection*> data, offset_to_index)
 *     elif tag == structs.T_A_ArrayExpr:             # <<<<<<<<<<<<<<
 *         return create_A_ArrayExpr(<structs.A_ArrayExpr*> data, offset_to_index)
 *     elif tag == structs.T_ResTarget:
 */
    break;
    case T_ResTarget:

    /* "pglast/ast.pyx":2459
 *         return create_A_ArrayExpr(<structs.A_ArrayExpr*> data, offset_to_index)
 *     elif tag == structs.T_ResTarget:
 *         return create_ResTarget(<structs.ResTarget*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_MultiAssignRef:
 *         return create_MultiAssignRef(<structs.MultiAssignRef*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ResTarget(((ResTarget *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2458
 *     elif tag == structs.T_A_ArrayExpr:
 *         return create_A_ArrayExpr(<structs.A_ArrayExpr*> data, offset_to_index)
 *     elif tag == structs.T_ResTarget:             # <<<<<<<<<<<<<<
 *         return create_ResTarget(<structs.ResTarget*> data, offset_to_index)
 *     elif tag == structs.T_MultiAssignRef:
 */
    break;
    case T_MultiAssignRef:

    /* "pglast/ast.pyx":2461
 *         return create_ResTarget(<structs.ResTarget*> data, offset_to_index)
 *     elif tag == structs.T_MultiAssignRef:
 *         return create_MultiAssignRef(<structs.MultiAssignRef*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TypeCast:
 *         return create_TypeCast(<structs.TypeCast*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_MultiAssignRef(((MultiAssignRef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2460
 *     elif tag == structs.T_ResTarget:
 *         return create_ResTarget(<structs.ResTarget*> data, offset_to_index)
 *     elif tag == structs.T_MultiAssignRef:             # <<<<<<<<<<<<<<
 *         return create_MultiAssignRef(<structs.MultiAssignRef*> data, offset_to_index)
 *     elif tag == structs.T_TypeCast:
 */
    break;
    case T_TypeCast:

    /* "pglast/ast.pyx":2463
 *         return create_MultiAssignRef(<structs.MultiAssignRef*> data, offset_to_index)
 *     elif tag == structs.T_TypeCast:
 *         return create_TypeCast(<structs.TypeCast*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CollateClause:
 *         return create_CollateClause(<structs.CollateClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TypeCast(((TypeCast *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2462
 *     elif tag == structs.T_MultiAssignRef:
 *         return create_MultiAssignRef(<structs.MultiAssignRef*> data, offset_to_index)
 *     elif tag == structs.T_TypeCast:             # <<<<<<<<<<<<<<
 *         return create_TypeCast(<structs.TypeCast*> data, offset_to_index)
 *     elif tag == structs.T_CollateClause:
 */
    break;
    case T_CollateClause:

    /* "pglast/ast.pyx":2465
 *         return create_TypeCast(<structs.TypeCast*> data, offset_to_index)
 *     elif tag == structs.T_CollateClause:
 *         return create_CollateClause(<structs.CollateClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SortBy:
 *         return create_SortBy(<structs.SortBy*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CollateClause(((CollateClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2464
 *     elif tag == structs.T_TypeCast:
 *         return create_TypeCast(<structs.TypeCast*> data, offset_to_index)
 *     elif tag == structs.T_CollateClause:             # <<<<<<<<<<<<<<
 *         return create_CollateClause(<structs.CollateClause*> data, offset_to_index)
 *     elif tag == structs.T_SortBy:
 */
    break;
    case T_SortBy:

    /* "pglast/ast.pyx":2467
 *         return create_CollateClause(<structs.CollateClause*> data, offset_to_index)
 *     elif tag == structs.T_SortBy:
 *         return create_SortBy(<structs.SortBy*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_WindowDef:
 *         return create_WindowDef(<structs.WindowDef*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SortBy(((SortBy *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2466
 *     elif tag == structs.T_CollateClause:
 *         return create_CollateClause(<structs.CollateClause*> data, offset_to_index)
 *     elif tag == structs.T_SortBy:             # <<<<<<<<<<<<<<
 *         return create_SortBy(<structs.SortBy*> data, offset_to_index)
 *     elif tag == structs.T_WindowDef:
 */
    break;
    case T_WindowDef:

    /* "pglast/ast.pyx":2469
 *         return create_SortBy(<structs.SortBy*> data, offset_to_index)
 *     elif tag == structs.T_WindowDef:
 *         return create_WindowDef(<structs.WindowDef*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeSubselect:
 *         return create_RangeSubselect(<structs.RangeSubselect*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_WindowDef(((WindowDef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2468
 *     elif tag == structs.T_SortBy:
 *         return create_SortBy(<structs.SortBy*> data, offset_to_index)
 *     elif tag == structs.T_WindowDef:             # <<<<<<<<<<<<<<
 *         return create_WindowDef(<structs.WindowDef*> data, offset_to_index)
 *     elif tag == structs.T_RangeSubselect:
 */
    break;
    case T_RangeSubselect:

    /* "pglast/ast.pyx":2471
 *         return create_WindowDef(<structs.WindowDef*> data, offset_to_index)
 *     elif tag == structs.T_RangeSubselect:
 *         return create_RangeSubselect(<structs.RangeSubselect*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeFunction:
 *         return create_RangeFunction(<structs.RangeFunction*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeSubselect(((RangeSubselect *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2470
 *     elif tag == structs.T_WindowDef:
 *         return create_WindowDef(<structs.WindowDef*> data, offset_to_index)
 *     elif tag == structs.T_RangeSubselect:             # <<<<<<<<<<<<<<
 *         return create_RangeSubselect(<structs.RangeSubselect*> data, offset_to_index)
 *     elif tag == structs.T_RangeFunction:
 */
    break;
    case T_RangeFunction:

    /* "pglast/ast.pyx":2473
 *         return create_RangeSubselect(<structs.RangeSubselect*> data, offset_to_index)
 *     elif tag == structs.T_RangeFunction:
 *         return create_RangeFunction(<structs.RangeFunction*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeTableSample:
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeFunction(((RangeFunction *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2472
 *     elif tag == structs.T_RangeSubselect:
 *         return create_RangeSubselect(<structs.RangeSubselect*> data, offset_to_index)
 *     elif tag == structs.T_RangeFunction:             # <<<<<<<<<<<<<<
 *         return create_RangeFunction(<structs.RangeFunction*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableSample:
 */
    break;
    case T_RangeTableSample:

    /* "pglast/ast.pyx":2475
 *         return create_RangeFunction(<structs.RangeFunction*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableSample:
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeTableFunc:
 *         return create_RangeTableFunc(<structs.RangeTableFunc*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeTableSample(((RangeTableSample *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2474
 *     elif tag == structs.T_RangeFunction:
 *         return create_RangeFunction(<structs.RangeFunction*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableSample:             # <<<<<<<<<<<<<<
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableFunc:
 */
    break;
    case T_RangeTableFunc:

    /* "pglast/ast.pyx":2477
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableFunc:
 *         return create_RangeTableFunc(<structs.RangeTableFunc*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeTableFuncCol:
 *         return create_RangeTableFuncCol(<structs.RangeTableFuncCol*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeTableFunc(((RangeTableFunc *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2476
 *     elif tag == structs.T_RangeTableSample:
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableFunc:             # <<<<<<<<<<<<<<
 *         return create_RangeTableFunc(<structs.RangeTableFunc*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableFuncCol:
 */
    break;
    case T_RangeTableFuncCol:

    /* "pglast/ast.pyx":2479
 *         return create_RangeTableFunc(<structs.RangeTableFunc*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableFuncCol:
 *         return create_RangeTableFuncCol(<structs.RangeTableFuncCol*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TypeName:
 *         return create_TypeName(<structs.TypeName*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeTableFuncCol(((RangeTableFuncCol *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2478
 *     elif tag == structs.T_RangeTableFunc:
 *         return create_RangeTableFunc(<structs.RangeTableFunc*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableFuncCol:             # <<<<<<<<<<<<<<
 *         return create_RangeTableFuncCol(<structs.RangeTableFuncCol*> data, offset_to_index)
 *     elif tag == structs.T_TypeName:
 */
    break;
    case T_TypeName:

    /* "pglast/ast.pyx":2481
 *         return create_RangeTableFuncCol(<structs.RangeTableFuncCol*> data, offset_to_index)
 *     elif tag == structs.T_TypeName:
 *         return create_TypeName(<structs.TypeName*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ColumnDef:
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TypeName(((TypeName *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2480
 *     elif tag == structs.T_RangeTableFuncCol:
 *         return create_RangeTableFuncCol(<structs.RangeTableFuncCol*> data, offset_to_index)
 *     elif tag == structs.T_TypeName:             # <<<<<<<<<<<<<<
 *         return create_TypeName(<structs.TypeName*> data, offset_to_index)
 *     elif tag == structs.T_ColumnDef:
 */
    break;
    case T_ColumnDef:

    /* "pglast/ast.pyx":2483
 *         return create_TypeName(<structs.TypeName*> data, offset_to_index)
 *     elif tag == structs.T_ColumnDef:
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_IndexElem:
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ColumnDef(((ColumnDef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2482
 *     elif tag == structs.T_TypeName:
 *         return create_TypeName(<structs.TypeName*> data, offset_to_index)
 *     elif tag == structs.T_ColumnDef:             # <<<<<<<<<<<<<<
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)
 *     elif tag == structs.T_IndexElem:
 */
    break;
    case T_IndexElem:

    /* "pglast/ast.pyx":2485
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)
 *     elif tag == structs.T_IndexElem:
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_StatsElem:
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_IndexElem(((IndexElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2484
 *     elif tag == structs.T_ColumnDef:
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)
 *     elif tag == structs.T_IndexElem:             # <<<<<<<<<<<<<<
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)
 *     elif tag == structs.T_StatsElem:
 */
    break;
    case T_StatsElem:

    /* "pglast/ast.pyx":2487
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)
 *     elif tag == structs.T_StatsElem:
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Constraint:
 *         return create_Constraint(<structs.Constraint*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_StatsElem(((StatsElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2486
 *     elif tag == structs.T_IndexElem:
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)
 *     elif tag == structs.T_StatsElem:             # <<<<<<<<<<<<<<
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)
 *     elif tag == structs.T_Constraint:
 */
    break;
    case T_Constraint:

    /* "pglast/ast.pyx":2489
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)
 *     elif tag == structs.T_Constraint:
 *         return create_Constraint(<structs.Constraint*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_DefElem:
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_Constraint(((Constraint *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2488
 *     elif tag == structs.T_StatsElem:
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)
 *     elif tag == structs.T_Constraint:             # <<<<<<<<<<<<<<
 *         return create_Constraint(<structs.Constraint*> data, offset_to_index)
 *     elif tag == structs.T_DefElem:
 */
    break;
    case T_DefElem:

    /* "pglast/ast.pyx":2491
 *         return create_Constraint(<structs.Constraint*> data, offset_to_index)
 *     elif tag == structs.T_DefElem:
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeTblEntry:
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_DefElem(((DefElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2490
 *     elif tag == structs.T_Constraint:
 *         return create_Constraint(<structs.Constraint*> data, offset_to_index)
 *     elif tag == structs.T_DefElem:             # <<<<<<<<<<<<<<
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblEntry:
 */
    break;
    case T_RangeTblEntry:

    /* "pglast/ast.pyx":2493
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblEntry:
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RangeTblFunction:
 *         return create_RangeTblFunction(<structs.RangeTblFunction*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeTblEntry(((RangeTblEntry *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2492
 *     elif tag == structs.T_DefElem:
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblEntry:             # <<<<<<<<<<<<<<
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblFunction:
 */
    break;
    case T_RangeTblFunction:

    /* "pglast/ast.pyx":2495
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblFunction:
 *         return create_RangeTblFunction(<structs.RangeTblFunction*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TableSampleClause:
 *         return create_TableSampleClause(<structs.TableSampleClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RangeTblFunction(((RangeTblFunction *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2494
 *     elif tag == structs.T_RangeTblEntry:
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblFunction:             # <<<<<<<<<<<<<<
 *         return create_RangeTblFunction(<structs.RangeTblFunction*> data, offset_to_index)
 *     elif tag == structs.T_TableSampleClause:
 */
    break;
    case T_TableSampleClause:

    /* "pglast/ast.pyx":2497
 *         return create_RangeTblFunction(<structs.RangeTblFunction*> data, offset_to_index)
 *     elif tag == structs.T_TableSampleClause:
 *         return create_TableSampleClause(<structs.TableSampleClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_WithCheckOption:
 *         return create_WithCheckOption(<structs.WithCheckOption*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TableSampleClause(((TableSampleClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2496
 *     elif tag == structs.T_RangeTblFunction:
 *         return create_RangeTblFunction(<structs.RangeTblFunction*> data, offset_to_index)
 *     elif tag == structs.T_TableSampleClause:             # <<<<<<<<<<<<<<
 *         return create_TableSampleClause(<structs.TableSampleClause*> data, offset_to_index)
 *     elif tag == structs.T_WithCheckOption:
 */
    break;
    case T_WithCheckOption:

    /* "pglast/ast.pyx":2499
 *         return create_TableSampleClause(<structs.TableSampleClause*> data, offset_to_index)
 *     elif tag == structs.T_WithCheckOption:
 *         return create_WithCheckOption(<structs.WithCheckOption*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_SortGroupClause:
 *         return create_SortGroupClause(<structs.SortGroupClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_WithCheckOption(((WithCheckOption *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2498
 *     elif tag == structs.T_TableSampleClause:
 *         return create_TableSampleClause(<structs.TableSampleClause*> data, offset_to_index)
 *     elif tag == structs.T_WithCheckOption:             # <<<<<<<<<<<<<<
 *         return create_WithCheckOption(<structs.WithCheckOption*> data, offset_to_index)
 *     elif tag == structs.T_SortGroupClause:
 */
    break;
    case T_SortGroupClause:

    /* "pglast/ast.pyx":2501
 *         return create_WithCheckOption(<structs.WithCheckOption*> data, offset_to_index)
 *     elif tag == structs.T_SortGroupClause:
 *         return create_SortGroupClause(<structs.SortGroupClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_GroupingSet:
 *         return create_GroupingSet(<structs.GroupingSet*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_SortGroupClause(((SortGroupClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2500
 *     elif tag == structs.T_WithCheckOption:
 *         return create_WithCheckOption(<structs.WithCheckOption*> data, offset_to_index)
 *     elif tag == structs.T_SortGroupClause:             # <<<<<<<<<<<<<<
 *         return create_SortGroupClause(<structs.SortGroupClause*> data, offset_to_index)
 *     elif tag == structs.T_GroupingSet:
 */
    break;
    case T_GroupingSet:

    /* "pglast/ast.pyx":2503
 *         return create_SortGroupClause(<structs.SortGroupClause*> data, offset_to_index)
 *     elif tag == structs.T_GroupingSet:
 *         return create_GroupingSet(<structs.GroupingSet*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_WindowClause:
 *         return create_WindowClause(<structs.WindowClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_GroupingSet(((GroupingSet *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2502
 *     elif tag == structs.T_SortGroupClause:
 *         return create_SortGroupClause(<structs.SortGroupClause*> data, offset_to_index)
 *     elif tag == structs.T_GroupingSet:             # <<<<<<<<<<<<<<
 *         return create_GroupingSet(<structs.GroupingSet*> data, offset_to_index)
 *     elif tag == structs.T_WindowClause:
 */
    break;
    case T_WindowClause:

    /* "pglast/ast.pyx":2505
 *         return create_GroupingSet(<structs.GroupingSet*> data, offset_to_index)
 *     elif tag == structs.T_WindowClause:
 *         return create_WindowClause(<structs.WindowClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ObjectWithArgs:
 *         return create_ObjectWithArgs(<structs.ObjectWithArgs*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_WindowClause(((WindowClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2504
 *     elif tag == structs.T_GroupingSet:
 *         return create_GroupingSet(<structs.GroupingSet*> data, offset_to_index)
 *     elif tag == structs.T_WindowClause:             # <<<<<<<<<<<<<<
 *         return create_WindowClause(<structs.WindowClause*> data, offset_to_index)
 *     elif tag == structs.T_ObjectWithArgs:
 */
    break;
    case T_ObjectWithArgs:

    /* "pglast/ast.pyx":2507
 *         return create_WindowClause(<structs.WindowClause*> data, offset_to_index)
 *     elif tag == structs.T_ObjectWithArgs:
 *         return create_ObjectWithArgs(<structs.ObjectWithArgs*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_AccessPriv:
 *         return create_AccessPriv(<structs.AccessPriv*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ObjectWithArgs(((ObjectWithArgs *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2506
 *     elif tag == structs.T_WindowClause:
 *         return create_WindowClause(<structs.WindowClause*> data, offset_to_index)
 *     elif tag == structs.T_ObjectWithArgs:             # <<<<<<<<<<<<<<
 *         return create_ObjectWithArgs(<structs.ObjectWithArgs*> data, offset_to_index)
 *     elif tag == structs.T_AccessPriv:
 */
    break;
    case T_AccessPriv:

    /* "pglast/ast.pyx":2509
 *         return create_ObjectWithArgs(<structs.ObjectWithArgs*> data, offset_to_index)
 *     elif tag == structs.T_AccessPriv:
 *         return create_AccessPriv(<structs.AccessPriv*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CreateOpClassItem:
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_AccessPriv(((AccessPriv *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2508
 *     elif tag == structs.T_ObjectWithArgs:
 *         return create_ObjectWithArgs(<structs.ObjectWithArgs*> data, offset_to_index)
 *     elif tag == structs.T_AccessPriv:             # <<<<<<<<<<<<<<
 *         return create_AccessPriv(<structs.AccessPriv*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassItem:
 */
    break;
    case T_CreateOpClassItem:

    /* "pglast/ast.pyx":2511
 *         return create_AccessPriv(<structs.AccessPriv*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassItem:
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TableLikeClause:
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CreateOpClassItem(((CreateOpClassItem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2510
 *     elif tag == structs.T_AccessPriv:
 *         return create_AccessPriv(<structs.AccessPriv*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassItem:             # <<<<<<<<<<<<<<
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> data, offset_to_index)
 *     elif tag == structs.T_TableLikeClause:
 */
    break;
    case T_TableLikeClause:

    /* "pglast/ast.pyx":2513
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> data, offset_to_index)
 *     elif tag == structs.T_TableLikeClause:
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_FunctionParameter:
 *         return create_FunctionParameter(<structs.FunctionParameter*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TableLikeClause(((TableLikeClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2512
 *     elif tag == structs.T_CreateOpClassItem:
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> data, offset_to_index)
 *     elif tag == structs.T_TableLikeClause:             # <<<<<<<<<<<<<<
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)
 *     elif tag == structs.T_FunctionParameter:
 */
    break;
    case T_FunctionParameter:

    /* "pglast/ast.pyx":2515
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)
 *     elif tag == structs.T_FunctionParameter:
 *         return create_FunctionParameter(<structs.FunctionParameter*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_LockingClause:
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_FunctionParameter(((FunctionParameter *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2514
 *     elif tag == structs.T_TableLikeClause:
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)
 *     elif tag == structs.T_FunctionParameter:             # <<<<<<<<<<<<<<
 *         return create_FunctionParameter(<structs.FunctionParameter*> data, offset_to_index)
 *     elif tag == structs.T_LockingClause:
 */
    break;
    case T_LockingClause:

    /* "pglast/ast.pyx":2517
 *         return create_FunctionParameter(<structs.FunctionParameter*> data, offset_to_index)
 *     elif tag == structs.T_LockingClause:
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RowMarkClause:
 *         return create_RowMarkClause(<structs.RowMarkClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_LockingClause(((LockingClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2516
 *     elif tag == structs.T_FunctionParameter:
 *         return create_FunctionParameter(<structs.FunctionParameter*> data, offset_to_index)
 *     elif tag == structs.T_LockingClause:             # <<<<<<<<<<<<<<
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)
 *     elif tag == structs.T_RowMarkClause:
 */
    break;
    case T_RowMarkClause:

    /* "pglast/ast.pyx":2519
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)
 *     elif tag == structs.T_RowMarkClause:
 *         return create_RowMarkClause(<structs.RowMarkClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_XmlSerialize:
 *         return create_XmlSerialize(<structs.XmlSerialize*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RowMarkClause(((RowMarkClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2518
 *     elif tag == structs.T_LockingClause:
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)
 *     elif tag == structs.T_RowMarkClause:             # <<<<<<<<<<<<<<
 *         return create_RowMarkClause(<structs.RowMarkClause*> data, offset_to_index)
 *     elif tag == structs.T_XmlSerialize:
 */
    break;
    case T_XmlSerialize:

    /* "pglast/ast.pyx":2521
 *         return create_RowMarkClause(<structs.RowMarkClause*> data, offset_to_index)
 *     elif tag == structs.T_XmlSerialize:
 *         return create_XmlSerialize(<structs.XmlSerialize*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_WithClause:
 *         return create_WithClause(<structs.WithClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_XmlSerialize(((XmlSerialize *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2520
 *     elif tag == structs.T_RowMarkClause:
 *         return create_RowMarkClause(<structs.RowMarkClause*> data, offset_to_index)
 *     elif tag == structs.T_XmlSerialize:             # <<<<<<<<<<<<<<
 *         return create_XmlSerialize(<structs.XmlSerialize*> data, offset_to_index)
 *     elif tag == structs.T_WithClause:
 */
    break;
    case T_WithClause:

    /* "pglast/ast.pyx":2523
 *         return create_XmlSerialize(<structs.XmlSerialize*> data, offset_to_index)
 *     elif tag == structs.T_WithClause:
 *         return create_WithClause(<structs.WithClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_InferClause:
 *         return create_InferClause(<structs.InferClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_WithClause(((WithClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2522
 *     elif tag == structs.T_XmlSerialize:
 *         return create_XmlSerialize(<structs.XmlSerialize*> data, offset_to_index)
 *     elif tag == structs.T_WithClause:             # <<<<<<<<<<<<<<
 *         return create_WithClause(<structs.WithClause*> data, offset_to_index)
 *     elif tag == structs.T_InferClause:
 */
    break;
    case T_InferClause:

    /* "pglast/ast.pyx":2525
 *         return create_WithClause(<structs.WithClause*> data, offset_to_index)
 *     elif tag == structs.T_InferClause:
 *         return create_InferClause(<structs.InferClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_OnConflictClause:
 *         return create_OnConflictClause(<structs.OnConflictClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_InferClause(((InferClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2524
 *     elif tag == structs.T_WithClause:
 *         return create_WithClause(<structs.WithClause*> data, offset_to_index)
 *     elif tag == structs.T_InferClause:             # <<<<<<<<<<<<<<
 *         return create_InferClause(<structs.InferClause*> data, offset_to_index)
 *     elif tag == structs.T_OnConflictClause:
 */
    break;
    case T_OnConflictClause:

    /* "pglast/ast.pyx":2527
 *         return create_InferClause(<structs.InferClause*> data, offset_to_index)
 *     elif tag == structs.T_OnConflictClause:
 *         return create_OnConflictClause(<structs.OnConflictClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CTESearchClause:
 *         return create_CTESearchClause(<structs.CTESearchClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_OnConflictClause(((OnConflictClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2526
 *     elif tag == structs.T_InferClause:
 *         return create_InferClause(<structs.InferClause*> data, offset_to_index)
 *     elif tag == structs.T_OnConflictClause:             # <<<<<<<<<<<<<<
 *         return create_OnConflictClause(<structs.OnConflictClause*> data, offset_to_index)
 *     elif tag == structs.T_CTESearchClause:
 */
    break;
    case T_CTESearchClause:

    /* "pglast/ast.pyx":2529
 *         return create_OnConflictClause(<structs.OnConflictClause*> data, offset_to_index)
 *     elif tag == structs.T_CTESearchClause:
 *         return create_CTESearchClause(<structs.CTESearchClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CTECycleClause:
 *         return create_CTECycleClause(<structs.CTECycleClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CTESearchClause(((CTESearchClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2528
 *     elif tag == structs.T_OnConflictClause:
 *         return create_OnConflictClause(<structs.OnConflictClause*> data, offset_to_index)
 *     elif tag == structs.T_CTESearchClause:             # <<<<<<<<<<<<<<
 *         return create_CTESearchClause(<structs.CTESearchClause*> data, offset_to_index)
 *     elif tag == structs.T_CTECycleClause:
 */
    break;
    case T_CTECycleClause:

    /* "pglast/ast.pyx":2531
 *         return create_CTESearchClause(<structs.CTESearchClause*> data, offset_to_index)
 *     elif tag == structs.T_CTECycleClause:
 *         return create_CTECycleClause(<structs.CTECycleClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CommonTableExpr:
 *         return create_CommonTableExpr(<structs.CommonTableExpr*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CTECycleClause(((CTECycleClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2530
 *     elif tag == structs.T_CTESearchClause:
 *         return create_CTESearchClause(<structs.CTESearchClause*> data, offset_to_index)
 *     elif tag == structs.T_CTECycleClause:             # <<<<<<<<<<<<<<
 *         return create_CTECycleClause(<structs.CTECycleClause*> data, offset_to_index)
 *     elif tag == structs.T_CommonTableExpr:
 */
    break;
    case T_CommonTableExpr:

    /* "pglast/ast.pyx":2533
 *         return create_CTECycleClause(<structs.CTECycleClause*> data, offset_to_index)
 *     elif tag == structs.T_CommonTableExpr:
 *         return create_CommonTableExpr(<structs.CommonTableExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_MergeWhenClause:
 *         return create_MergeWhenClause(<structs.MergeWhenClause*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CommonTableExpr(((CommonTableExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2532
 *     elif tag == structs.T_CTECycleClause:
 *         return create_CTECycleClause(<structs.CTECycleClause*> data, offset_to_index)
 *     elif tag == structs.T_CommonTableExpr:             # <<<<<<<<<<<<<<
 *         return create_CommonTableExpr(<structs.CommonTableExpr*> data, offset_to_index)
 *     elif tag == structs.T_MergeWhenClause:
 */
    break;
    case T_MergeWhenClause:

    /* "pglast/ast.pyx":2535
 *         return create_CommonTableExpr(<structs.CommonTableExpr*> data, offset_to_index)
 *     elif tag == structs.T_MergeWhenClause:
 *         return create_MergeWhenClause(<structs.MergeWhenClause*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RoleSpec:
 *         return create_RoleSpec(<structs.RoleSpec*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_MergeWhenClause(((MergeWhenClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2534
 *     elif tag == structs.T_CommonTableExpr:
 *         return create_CommonTableExpr(<structs.CommonTableExpr*> data, offset_to_index)
 *     elif tag == structs.T_MergeWhenClause:             # <<<<<<<<<<<<<<
 *         return create_MergeWhenClause(<structs.MergeWhenClause*> data, offset_to_index)
 *     elif tag == structs.T_RoleSpec:
 */
    break;
    case T_RoleSpec:

    /* "pglast/ast.pyx":2537
 *         return create_MergeWhenClause(<structs.MergeWhenClause*> data, offset_to_index)
 *     elif tag == structs.T_RoleSpec:
 *         return create_RoleSpec(<structs.RoleSpec*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_TriggerTransition:
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_RoleSpec(((RoleSpec *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2536
 *     elif tag == structs.T_MergeWhenClause:
 *         return create_MergeWhenClause(<structs.MergeWhenClause*> data, offset_to_index)
 *     elif tag == structs.T_RoleSpec:             # <<<<<<<<<<<<<<
 *         return create_RoleSpec(<structs.RoleSpec*> data, offset_to_index)
 *     elif tag == structs.T_TriggerTransition:
 */
    break;
    case T_TriggerTransition:

    /* "pglast/ast.pyx":2539
 *         return create_RoleSpec(<structs.RoleSpec*> data, offset_to_index)
 *     elif tag == structs.T_TriggerTransition:
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PartitionElem:
 *         return create_PartitionElem(<structs.PartitionElem*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_TriggerTransition(((TriggerTransition *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2538
 *     elif tag == structs.T_RoleSpec:
 *         return create_RoleSpec(<structs.RoleSpec*> data, offset_to_index)
 *     elif tag == structs.T_TriggerTransition:             # <<<<<<<<<<<<<<
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)
 *     elif tag == structs.T_PartitionElem:
 */
    break;
    case T_PartitionElem:

    /* "pglast/ast.pyx":2541
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)
 *     elif tag == structs.T_PartitionElem:
 *         return create_PartitionElem(<structs.PartitionElem*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PartitionSpec:
 *         return create_PartitionSpec(<structs.PartitionSpec*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PartitionElem(((PartitionElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2540
 *     elif tag == structs.T_TriggerTransition:
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)
 *     elif tag == structs.T_PartitionElem:             # <<<<<<<<<<<<<<
 *         return create_PartitionElem(<structs.PartitionElem*> data, offset_to_index)
 *     elif tag == structs.T_PartitionSpec:
 */
    break;
    case T_PartitionSpec:

    /* "pglast/ast.pyx":2543
 *         return create_PartitionElem(<structs.PartitionElem*> data, offset_to_index)
 *     elif tag == structs.T_PartitionSpec:
 *         return create_PartitionSpec(<structs.PartitionSpec*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PartitionBoundSpec:
 *         return create_PartitionBoundSpec(<structs.PartitionBoundSpec*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PartitionSpec(((PartitionSpec *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2542
 *     elif tag == structs.T_PartitionElem:
 *         return create_PartitionElem(<structs.PartitionElem*> data, offset_to_index)
 *     elif tag == structs.T_PartitionSpec:             # <<<<<<<<<<<<<<
 *         return create_PartitionSpec(<structs.PartitionSpec*> data, offset_to_index)
 *     elif tag == structs.T_PartitionBoundSpec:
 */
    break;
    case T_PartitionBoundSpec:

    /* "pglast/ast.pyx":2545
 *         return create_PartitionSpec(<structs.PartitionSpec*> data, offset_to_index)
 *     elif tag == structs.T_PartitionBoundSpec:
 *         return create_PartitionBoundSpec(<structs.PartitionBoundSpec*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PartitionRangeDatum:
 *         return create_PartitionRangeDatum(<structs.PartitionRangeDatum*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PartitionBoundSpec(((PartitionBoundSpec *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2544
 *     elif tag == structs.T_PartitionSpec:
 *         return create_PartitionSpec(<structs.PartitionSpec*> data, offset_to_index)
 *     elif tag == structs.T_PartitionBoundSpec:             # <<<<<<<<<<<<<<
 *         return create_PartitionBoundSpec(<structs.PartitionBoundSpec*> data, offset_to_index)
 *     elif tag == structs.T_PartitionRangeDatum:
 */
    break;
    case T_PartitionRangeDatum:

    /* "pglast/ast.pyx":2547
 *         return create_PartitionBoundSpec(<structs.PartitionBoundSpec*> data, offset_to_index)
 *     elif tag == structs.T_PartitionRangeDatum:
 *         return create_PartitionRangeDatum(<structs.PartitionRangeDatum*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PartitionCmd:
 *         return create_PartitionCmd(<structs.PartitionCmd*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PartitionRangeDatum(((PartitionRangeDatum *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2546
 *     elif tag == structs.T_PartitionBoundSpec:
 *         return create_PartitionBoundSpec(<structs.PartitionBoundSpec*> data, offset_to_index)
 *     elif tag == structs.T_PartitionRangeDatum:             # <<<<<<<<<<<<<<
 *         return create_PartitionRangeDatum(<structs.PartitionRangeDatum*> data, offset_to_index)
 *     elif tag == structs.T_PartitionCmd:
 */
    break;
    case T_PartitionCmd:

    /* "pglast/ast.pyx":2549
 *         return create_PartitionRangeDatum(<structs.PartitionRangeDatum*> data, offset_to_index)
 *     elif tag == structs.T_PartitionCmd:
 *         return create_PartitionCmd(<structs.PartitionCmd*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_VacuumRelation:
 *         return create_VacuumRelation(<structs.VacuumRelation*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PartitionCmd(((PartitionCmd *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2548
 *     elif tag == structs.T_PartitionRangeDatum:
 *         return create_PartitionRangeDatum(<structs.PartitionRangeDatum*> data, offset_to_index)
 *     elif tag == structs.T_PartitionCmd:             # <<<<<<<<<<<<<<
 *         return create_PartitionCmd(<structs.PartitionCmd*> data, offset_to_index)
 *     elif tag == structs.T_VacuumRelation:
 */
    break;
    case T_VacuumRelation:

    /* "pglast/ast.pyx":2551
 *         return create_PartitionCmd(<structs.PartitionCmd*> data, offset_to_index)
 *     elif tag == structs.T_VacuumRelation:
 *         return create_VacuumRelation(<structs.VacuumRelation*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PublicationObjSpec:
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_VacuumRelation(((VacuumRelation *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2550
 *     elif tag == structs.T_PartitionCmd:
 *         return create_PartitionCmd(<structs.PartitionCmd*> data, offset_to_index)
 *     elif tag == structs.T_VacuumRelation:             # <<<<<<<<<<<<<<
 *         return create_VacuumRelation(<structs.VacuumRelation*> data, offset_to_index)
 *     elif tag == structs.T_PublicationObjSpec:
 */
    break;
    case T_PublicationObjSpec:

    /* "pglast/ast.pyx":2553
 *         return create_VacuumRelation(<structs.VacuumRelation*> data, offset_to_index)
 *     elif tag == structs.T_PublicationObjSpec:
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_PublicationTable:
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PublicationObjSpec(((PublicationObjSpec *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2552
 *     elif tag == structs.T_VacuumRelation:
 *         return create_VacuumRelation(<structs.VacuumRelation*> data, offset_to_index)
 *     elif tag == structs.T_PublicationObjSpec:             # <<<<<<<<<<<<<<
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> data, offset_to_index)
 *     elif tag == structs.T_PublicationTable:
 */
    break;
    case T_PublicationTable:

    /* "pglast/ast.pyx":2555
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> data, offset_to_index)
 *     elif tag == structs.T_PublicationTable:
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_InlineCodeBlock:
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_PublicationTable(((PublicationTable *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2554
 *     elif tag == structs.T_PublicationObjSpec:
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> data, offset_to_index)
 *     elif tag == structs.T_PublicationTable:             # <<<<<<<<<<<<<<
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)
 *     elif tag == structs.T_InlineCodeBlock:
 */
    break;
    case T_InlineCodeBlock:

    /* "pglast/ast.pyx":2557
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)
 *     elif tag == structs.T_InlineCodeBlock:
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_CallContext:
 *         return create_CallContext(<structs.CallContext*> data, offset_to_index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_InlineCodeBlock(((InlineCodeBlock *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2556
 *     elif tag == structs.T_PublicationTable:
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)
 *     elif tag == structs.T_InlineCodeBlock:             # <<<<<<<<<<<<<<
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)
 *     elif tag == structs.T_CallContext:
 */
    break;
    case T_CallContext:

    /* "pglast/ast.pyx":2559
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)
 *     elif tag == structs.T_CallContext:
 *         return create_CallContext(<structs.CallContext*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     raise ValueError("Unhandled tag: %s" % tag)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_CallContext(((CallContext *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2558
 *     elif tag == structs.T_InlineCodeBlock:
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)
 *     elif tag == structs.T_CallContext:             # <<<<<<<<<<<<<<
 *         return create_CallContext(<structs.CallContext*> data, offset_to_index)
 *     raise ValueError("Unhandled tag: %s" % tag)
 */
    break;
    default: break;
  }

  /* "pglast/ast.pyx":2560
 *     elif tag == structs.T_CallContext:
 *         return create_CallContext(<structs.CallContext*> data, offset_to_index)
 *     raise ValueError("Unhandled tag: %s" % tag)             # <<<<<<<<<<<<<<
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_Unhandled_tag_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 2560, __pyx_L1_error)

  /* "pglast/ast.pyx":2085
 * 
 * 
 * cdef create(void* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     if data is NULL:
 *         return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":28
 *     "Exception representing the error state returned by the PG parser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_10ParseError_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pglast_6parser_10ParseError_1__str__ = {"__str__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_10ParseError_1__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pglast_6parser_10ParseError_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 28, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__str__") < 0)) __PYX_ERR(1, 28, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 28, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.ParseError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pglast_6parser_10ParseError___str__(__pyx_self, __pyx_v_self);

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

static PyObject *__pyx_pf_6pglast_6parser_10ParseError___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pglast/parser.pyx":29
 * 
 *     def __str__(self):
 *         message = self.args[0]             # <<<<<<<<<<<<<<
 *         if len(self.args) > 1:
 *             location = self.args[1]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_message = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/parser.pyx":30
 *     def __str__(self):
 *         message = self.args[0]
 *         if len(self.args) > 1:             # <<<<<<<<<<<<<<
 *             location = self.args[1]
 *             if location is not None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 > 1);
  if (__pyx_t_4) {

    /* "pglast/parser.pyx":31
 *         message = self.args[0]
 *         if len(self.args) > 1:
 *             location = self.args[1]             # <<<<<<<<<<<<<<
 *             if location is not None:
 *                 message += f', at index {location}'
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 31, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_location = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/parser.pyx":32
 *         if len(self.args) > 1:
 *             location = self.args[1]
 *             if location is not None:             # <<<<<<<<<<<<<<
 *                 message += f', at index {location}'
 *         return message
 */
    __pyx_t_4 = (__pyx_v_location != Py_None);
    if (__pyx_t_4) {

      /* "pglast/parser.pyx":33
 *             location = self.args[1]
 *             if location is not None:
 *                 message += f', at index {location}'             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_location, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_at_index, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_message, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":32
 *         if len(self.args) > 1:
 *             location = self.args[1]
 *             if location is not None:             # <<<<<<<<<<<<<<
 *                 message += f', at index {location}'
 *         return message
 */
    }

    /* "pglast/parser.pyx":30
 *     def __str__(self):
 *         message = self.args[0]
 *         if len(self.args) > 1:             # <<<<<<<<<<<<<<
 *             location = self.args[1]
 *             if location is not None:
 */
  }

  /* "pglast/parser.pyx":34
 *             if location is not None:
 *                 message += f', at index {location}'
 *         return message             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pglast/parser.pyx":28
 *     "Exception representing the error state returned by the PG parser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pglast.parser.ParseError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":40
 *     "Exception representing the error state returned by the PG deparser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_12DeparseError_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pglast_6parser_12DeparseError_1__str__ = {"__str__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_12DeparseError_1__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pglast_6parser_12DeparseError_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 40, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__str__") < 0)) __PYX_ERR(1, 40, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 40, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.DeparseError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pglast_6parser_12DeparseError___str__(__pyx_self, __pyx_v_self);

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

static PyObject *__pyx_pf_6pglast_6parser_12DeparseError___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "pglast/parser.pyx":41
 * 
 *     def __str__(self):
 *         message = self.args[0]             # <<<<<<<<<<<<<<
 *         if len(self.args) > 1:
 *             location = self.args[1]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_message = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pglast/parser.pyx":42
 *     def __str__(self):
 *         message = self.args[0]
 *         if len(self.args) > 1:             # <<<<<<<<<<<<<<
 *             location = self.args[1]
 *             if location is not None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 > 1);
  if (__pyx_t_4) {

    /* "pglast/parser.pyx":43
 *         message = self.args[0]
 *         if len(self.args) > 1:
 *             location = self.args[1]             # <<<<<<<<<<<<<<
 *             if location is not None:
 *                 message += f', at position {location}'
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_location = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/parser.pyx":44
 *         if len(self.args) > 1:
 *             location = self.args[1]
 *             if location is not None:             # <<<<<<<<<<<<<<
 *                 message += f', at position {location}'
 *         return message
 */
    __pyx_t_4 = (__pyx_v_location != Py_None);
    if (__pyx_t_4) {

      /* "pglast/parser.pyx":45
 *             location = self.args[1]
 *             if location is not None:
 *                 message += f', at position {location}'             # <<<<<<<<<<<<<<
 *         return message
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_location, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_at_position, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_message, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":44
 *         if len(self.args) > 1:
 *             location = self.args[1]
 *             if location is not None:             # <<<<<<<<<<<<<<
 *                 message += f', at position {location}'
 *         return message
 */
    }

    /* "pglast/parser.pyx":42
 *     def __str__(self):
 *         message = self.args[0]
 *         if len(self.args) > 1:             # <<<<<<<<<<<<<<
 *             location = self.args[1]
 *             if location is not None:
 */
  }

  /* "pglast/parser.pyx":46
 *             if location is not None:
 *                 message += f', at position {location}'
 *         return message             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "pglast/parser.pyx":40
 *     "Exception representing the error state returned by the PG deparser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pglast.parser.DeparseError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":206
 *     cdef unsigned long max_offset
 * 
 *     def __init__(self, str s):             # <<<<<<<<<<<<<<
 *         cdef unsigned long idx = 0
 *         cdef unsigned long ofs = 0
 */

/* Python wrapper */
static int __pyx_pw_6pglast_6parser_13Displacements_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pglast_6parser_13Displacements_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_s = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 206, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 206, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_s = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 206, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.Displacements.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyUnicode_Type), 1, "s", 1))) __PYX_ERR(1, 206, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_13Displacements___init__(((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_v_self), __pyx_v_s);

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

static int __pyx_pf_6pglast_6parser_13Displacements___init__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self, PyObject *__pyx_v_s) {
  unsigned long __pyx_v_idx;
  unsigned long __pyx_v_ofs;
  size_t __pyx_v_c_len_in_utf8;
  PyObject *__pyx_v_disps = NULL;
  Py_UCS4 __pyx_v_c;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  void *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pglast/parser.pyx":207
 * 
 *     def __init__(self, str s):
 *         cdef unsigned long idx = 0             # <<<<<<<<<<<<<<
 *         cdef unsigned long ofs = 0
 *         cdef size_t c_len_in_utf8
 */
  __pyx_v_idx = 0;

  /* "pglast/parser.pyx":208
 *     def __init__(self, str s):
 *         cdef unsigned long idx = 0
 *         cdef unsigned long ofs = 0             # <<<<<<<<<<<<<<
 *         cdef size_t c_len_in_utf8
 * 
 */
  __pyx_v_ofs = 0;

  /* "pglast/parser.pyx":211
 *         cdef size_t c_len_in_utf8
 * 
 *         disps = []             # <<<<<<<<<<<<<<
 *         for c in s:
 *             c_len_in_utf8 = len(c.encode('utf-8'))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_disps = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":212
 * 
 *         disps = []
 *         for c in s:             # <<<<<<<<<<<<<<
 *             c_len_in_utf8 = len(c.encode('utf-8'))
 *             if c_len_in_utf8 > 1:
 */
  if (unlikely(__pyx_v_s == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(1, 212, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_s);
  __pyx_t_2 = __pyx_v_s;
  __pyx_t_7 = __Pyx_init_unicode_iteration(__pyx_t_2, (&__pyx_t_4), (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 212, __pyx_L1_error)
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_4; __pyx_t_8++) {
    __pyx_t_3 = __pyx_t_8;
    __pyx_v_c = __Pyx_PyUnicode_READ(__pyx_t_6, __pyx_t_5, __pyx_t_3);

    /* "pglast/parser.pyx":213
 *         disps = []
 *         for c in s:
 *             c_len_in_utf8 = len(c.encode('utf-8'))             # <<<<<<<<<<<<<<
 *             if c_len_in_utf8 > 1:
 *                 while c_len_in_utf8 > 0:
 */
    __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = PyBytes_GET_SIZE(__pyx_t_9); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_c_len_in_utf8 = __pyx_t_10;

    /* "pglast/parser.pyx":214
 *         for c in s:
 *             c_len_in_utf8 = len(c.encode('utf-8'))
 *             if c_len_in_utf8 > 1:             # <<<<<<<<<<<<<<
 *                 while c_len_in_utf8 > 0:
 *                     disps.append((ofs, idx))
 */
    __pyx_t_11 = (__pyx_v_c_len_in_utf8 > 1);
    if (__pyx_t_11) {

      /* "pglast/parser.pyx":215
 *             c_len_in_utf8 = len(c.encode('utf-8'))
 *             if c_len_in_utf8 > 1:
 *                 while c_len_in_utf8 > 0:             # <<<<<<<<<<<<<<
 *                     disps.append((ofs, idx))
 *                     c_len_in_utf8 -= 1
 */
      while (1) {
        __pyx_t_11 = (__pyx_v_c_len_in_utf8 > 0);
        if (!__pyx_t_11) break;

        /* "pglast/parser.pyx":216
 *             if c_len_in_utf8 > 1:
 *                 while c_len_in_utf8 > 0:
 *                     disps.append((ofs, idx))             # <<<<<<<<<<<<<<
 *                     c_len_in_utf8 -= 1
 *                     ofs += 1
 */
        __pyx_t_9 = __Pyx_PyInt_From_unsigned_long(__pyx_v_ofs); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1);
        __pyx_t_9 = 0;
        __pyx_t_1 = 0;
        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_disps, __pyx_t_12); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 216, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "pglast/parser.pyx":217
 *                 while c_len_in_utf8 > 0:
 *                     disps.append((ofs, idx))
 *                     c_len_in_utf8 -= 1             # <<<<<<<<<<<<<<
 *                     ofs += 1
 *             else:
 */
        __pyx_v_c_len_in_utf8 = (__pyx_v_c_len_in_utf8 - 1);

        /* "pglast/parser.pyx":218
 *                     disps.append((ofs, idx))
 *                     c_len_in_utf8 -= 1
 *                     ofs += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 ofs += 1
 */
        __pyx_v_ofs = (__pyx_v_ofs + 1);
      }

      /* "pglast/parser.pyx":214
 *         for c in s:
 *             c_len_in_utf8 = len(c.encode('utf-8'))
 *             if c_len_in_utf8 > 1:             # <<<<<<<<<<<<<<
 *                 while c_len_in_utf8 > 0:
 *                     disps.append((ofs, idx))
 */
      goto __pyx_L5;
    }

    /* "pglast/parser.pyx":220
 *                     ofs += 1
 *             else:
 *                 ofs += 1             # <<<<<<<<<<<<<<
 *             idx += 1
 *         self.max_offset = ofs - 1
 */
    /*else*/ {
      __pyx_v_ofs = (__pyx_v_ofs + 1);
    }
    __pyx_L5:;

    /* "pglast/parser.pyx":221
 *             else:
 *                 ofs += 1
 *             idx += 1             # <<<<<<<<<<<<<<
 *         self.max_offset = ofs - 1
 *         self.displacements = tuple(reversed(disps))
 */
    __pyx_v_idx = (__pyx_v_idx + 1);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":222
 *                 ofs += 1
 *             idx += 1
 *         self.max_offset = ofs - 1             # <<<<<<<<<<<<<<
 *         self.displacements = tuple(reversed(disps))
 * 
 */
  __pyx_v_self->max_offset = (__pyx_v_ofs - 1);

  /* "pglast/parser.pyx":223
 *             idx += 1
 *         self.max_offset = ofs - 1
 *         self.displacements = tuple(reversed(disps))             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, offset):
 */
  __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_reversed, __pyx_v_disps); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->displacements);
  __Pyx_DECREF(__pyx_v_self->displacements);
  __pyx_v_self->displacements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":206
 *     cdef unsigned long max_offset
 * 
 *     def __init__(self, str s):             # <<<<<<<<<<<<<<
 *         cdef unsigned long idx = 0
 *         cdef unsigned long ofs = 0
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pglast.parser.Displacements.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_disps);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":225
 *         self.displacements = tuple(reversed(disps))
 * 
 *     def __call__(self, offset):             # <<<<<<<<<<<<<<
 *         if not 0 <= offset <= self.max_offset:
 *             # It may happen that the error is actually at the very end of the statement, giving
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_13Displacements_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pglast_6parser_13Displacements_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_offset = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_offset)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(1, 225, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_offset = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 225, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.Displacements.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pglast_6parser_13Displacements_2__call__(((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_v_self), __pyx_v_offset);

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

static PyObject *__pyx_pf_6pglast_6parser_13Displacements_2__call__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self, PyObject *__pyx_v_offset) {
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "pglast/parser.pyx":226
 * 
 *     def __call__(self, offset):
 *         if not 0 <= offset <= self.max_offset:             # <<<<<<<<<<<<<<
 *             # It may happen that the error is actually at the very end of the statement, giving
 *             # the message "syntax error at end of input", with a position that is beyond the
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_offset, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_self->max_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_offset, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
    __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_ERR(1, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (__pyx_t_4) {

    /* "pglast/parser.pyx":230
 *             # the message "syntax error at end of input", with a position that is beyond the
 *             # end of the string. Return None in such case
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         for o, i in self.displacements:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "pglast/parser.pyx":226
 * 
 *     def __call__(self, offset):
 *         if not 0 <= offset <= self.max_offset:             # <<<<<<<<<<<<<<
 *             # It may happen that the error is actually at the very end of the statement, giving
 *             # the message "syntax error at end of input", with a position that is beyond the
 */
  }

  /* "pglast/parser.pyx":232
 *             return None
 * 
 *         for o, i in self.displacements:             # <<<<<<<<<<<<<<
 *             if o <= offset:
 *                 return i + (offset - o)
 */
  if (unlikely(__pyx_v_self->displacements == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 232, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->displacements; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(1, 232, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(1, 232, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(1, 232, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(1, 232, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pglast/parser.pyx":233
 * 
 *         for o, i in self.displacements:
 *             if o <= offset:             # <<<<<<<<<<<<<<
 *                 return i + (offset - o)
 * 
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_o, __pyx_v_offset, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 233, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 233, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "pglast/parser.pyx":234
 *         for o, i in self.displacements:
 *             if o <= offset:
 *                 return i + (offset - o)             # <<<<<<<<<<<<<<
 * 
 *         return offset
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyNumber_Subtract(__pyx_v_offset, __pyx_v_o); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyNumber_Add(__pyx_v_i, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pglast/parser.pyx":233
 * 
 *         for o, i in self.displacements:
 *             if o <= offset:             # <<<<<<<<<<<<<<
 *                 return i + (offset - o)
 * 
 */
    }

    /* "pglast/parser.pyx":232
 *             return None
 * 
 *         for o, i in self.displacements:             # <<<<<<<<<<<<<<
 *             if o <= offset:
 *                 return i + (offset - o)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pglast/parser.pyx":236
 *                 return i + (offset - o)
 * 
 *         return offset             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_offset);
  __pyx_r = __pyx_v_offset;
  goto __pyx_L0;

  /* "pglast/parser.pyx":225
 *         self.displacements = tuple(reversed(disps))
 * 
 *     def __call__(self, offset):             # <<<<<<<<<<<<<<
 *         if not 0 <= offset <= self.max_offset:
 *             # It may happen that the error is actually at the very end of the statement, giving
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pglast.parser.Displacements.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_13Displacements_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pglast_6parser_13Displacements_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_13Displacements_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pglast_6parser_13Displacements_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_6pglast_6parser_13Displacements_4__reduce_cython__(((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_v_self));

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

static PyObject *__pyx_pf_6pglast_6parser_13Displacements_4__reduce_cython__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.displacements, self.max_offset)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_self->max_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->displacements);
  __Pyx_GIVEREF(__pyx_v_self->displacements);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->displacements);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.displacements, self.max_offset)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self.displacements, self.max_offset)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.displacements is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.displacements, self.max_offset)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.displacements is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->displacements != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.displacements is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.displacements is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Displacements); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_37136258);
    __Pyx_GIVEREF(__pyx_int_37136258);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_37136258);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.displacements is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, None), state
 *     else:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Displacements__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Displacements); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_37136258);
    __Pyx_GIVEREF(__pyx_int_37136258);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_37136258);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_4 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.Displacements.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Displacements__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_13Displacements_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pglast_6parser_13Displacements_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_13Displacements_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pglast_6parser_13Displacements_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(2, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.Displacements.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pglast_6parser_13Displacements_6__setstate_cython__(((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_v_self), __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_6pglast_6parser_13Displacements_6__setstate_cython__(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Displacements__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6pglast_6parser___pyx_unpickle_Displacements__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Displacements__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pglast.parser.Displacements.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":239
 * 
 * 
 * def get_postgresql_version():             # <<<<<<<<<<<<<<
 *     "Return the ``PostgreSQL`` version as a tuple (`major`, `minor`)."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_1get_postgresql_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_get_postgresql_version, "Return the ``PostgreSQL`` version as a tuple (`major`, `minor`).");
static PyMethodDef __pyx_mdef_6pglast_6parser_1get_postgresql_version = {"get_postgresql_version", (PyCFunction)__pyx_pw_6pglast_6parser_1get_postgresql_version, METH_NOARGS, __pyx_doc_6pglast_6parser_get_postgresql_version};
static PyObject *__pyx_pw_6pglast_6parser_1get_postgresql_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_postgresql_version (wrapper)", 0);
  __pyx_r = __pyx_pf_6pglast_6parser_get_postgresql_version(__pyx_self);

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

static PyObject *__pyx_pf_6pglast_6parser_get_postgresql_version(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_version;
  PyObject *__pyx_v_major = NULL;
  PyObject *__pyx_v_minor = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_postgresql_version", 0);

  /* "pglast/parser.pyx":242
 *     "Return the ``PostgreSQL`` version as a tuple (`major`, `minor`)."
 * 
 *     version = PG_VERSION_NUM             # <<<<<<<<<<<<<<
 *     major, minor = divmod(version, 10_000)
 *     return (major, minor)
 */
  __pyx_v_version = PG_VERSION_NUM;

  /* "pglast/parser.pyx":243
 * 
 *     version = PG_VERSION_NUM
 *     major, minor = divmod(version, 10_000)             # <<<<<<<<<<<<<<
 *     return (major, minor)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Divmod(__pyx_t_1, __pyx_int_10000); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 243, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(1, 243, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(1, 243, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_major = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_minor = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/parser.pyx":244
 *     version = PG_VERSION_NUM
 *     major, minor = divmod(version, 10_000)
 *     return (major, minor)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_major);
  __Pyx_GIVEREF(__pyx_v_major);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_major);
  __Pyx_INCREF(__pyx_v_minor);
  __Pyx_GIVEREF(__pyx_v_minor);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_minor);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pglast/parser.pyx":239
 * 
 * 
 * def get_postgresql_version():             # <<<<<<<<<<<<<<
 *     "Return the ``PostgreSQL`` version as a tuple (`major`, `minor`)."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.get_postgresql_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_major);
  __Pyx_XDECREF(__pyx_v_minor);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":247
 * 
 * 
 * def parse_sql(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its abstract syntax tree."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_3parse_sql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_2parse_sql, "Parse the given ``SQL`` `query` and return its abstract syntax tree.");
static PyMethodDef __pyx_mdef_6pglast_6parser_3parse_sql = {"parse_sql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_3parse_sql, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_2parse_sql};
static PyObject *__pyx_pw_6pglast_6parser_3parse_sql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_query = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_sql (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_query)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 247, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_sql") < 0)) __PYX_ERR(1, 247, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_sql", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 247, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.parse_sql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(1, 247, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_2parse_sql(__pyx_self, __pyx_v_query);

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

static PyObject *__pyx_pf_6pglast_6parser_2parse_sql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query) {
  PgQueryInternalParsetreeAndError __pyx_v_parsed;
  MemoryContext __pyx_v_mctx;
  int __pyx_v_i;
  char const *__pyx_v_cstring;
  PyObject *__pyx_v_utf8 = NULL;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = NULL;
  PyObject *__pyx_v_stmts = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  char *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_sql", 0);

  /* "pglast/parser.pyx":255
 *     cdef const char *cstring
 * 
 *     utf8 = query.encode('utf-8')             # <<<<<<<<<<<<<<
 *     offset_to_index = Displacements(query)
 *     cstring = utf8
 */
  if (unlikely(__pyx_v_query == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(1, 255, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":256
 * 
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":257
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     mctx = pg_query_enter_memory_context()
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":259
 *     cstring = utf8
 * 
 *     mctx = pg_query_enter_memory_context()             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_v_mctx = pg_query_enter_memory_context();

  /* "pglast/parser.pyx":261
 *     mctx = pg_query_enter_memory_context()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_raw_parse(cstring)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":262
 * 
 *     with nogil:
 *         parsed = pg_query_raw_parse(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_v_parsed = pg_query_raw_parse(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":261
 *     mctx = pg_query_enter_memory_context()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_raw_parse(cstring)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":264
 *         parsed = pg_query_raw_parse(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.tree is not NULL:
 *             stmts = PyTuple_New(parsed.tree.length)
 */
  /*try:*/ {

    /* "pglast/parser.pyx":265
 * 
 *     try:
 *         if parsed.tree is not NULL:             # <<<<<<<<<<<<<<
 *             stmts = PyTuple_New(parsed.tree.length)
 *             for i in range(parsed.tree.length):
 */
    __pyx_t_3 = (__pyx_v_parsed.tree != NULL);
    if (__pyx_t_3) {

      /* "pglast/parser.pyx":266
 *     try:
 *         if parsed.tree is not NULL:
 *             stmts = PyTuple_New(parsed.tree.length)             # <<<<<<<<<<<<<<
 *             for i in range(parsed.tree.length):
 *                 item = create(structs.list_nth(parsed.tree, i), offset_to_index)
 */
      __pyx_t_1 = PyTuple_New(__pyx_v_parsed.tree->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_stmts = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":267
 *         if parsed.tree is not NULL:
 *             stmts = PyTuple_New(parsed.tree.length)
 *             for i in range(parsed.tree.length):             # <<<<<<<<<<<<<<
 *                 item = create(structs.list_nth(parsed.tree, i), offset_to_index)
 *                 Py_INCREF(item)
 */
      __pyx_t_4 = __pyx_v_parsed.tree->length;
      __pyx_t_5 = __pyx_t_4;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_v_i = __pyx_t_6;

        /* "pglast/parser.pyx":268
 *             stmts = PyTuple_New(parsed.tree.length)
 *             for i in range(parsed.tree.length):
 *                 item = create(structs.list_nth(parsed.tree, i), offset_to_index)             # <<<<<<<<<<<<<<
 *                 Py_INCREF(item)
 *                 PyTuple_SET_ITEM(stmts, i, item)
 */
        __pyx_t_1 = __pyx_f_6pglast_6parser_create(list_nth(__pyx_v_parsed.tree, __pyx_v_i), ((PyObject *)__pyx_v_offset_to_index)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 268, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pglast/parser.pyx":269
 *             for i in range(parsed.tree.length):
 *                 item = create(structs.list_nth(parsed.tree, i), offset_to_index)
 *                 Py_INCREF(item)             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(stmts, i, item)
 *             return stmts
 */
        Py_INCREF(__pyx_v_item);

        /* "pglast/parser.pyx":270
 *                 item = create(structs.list_nth(parsed.tree, i), offset_to_index)
 *                 Py_INCREF(item)
 *                 PyTuple_SET_ITEM(stmts, i, item)             # <<<<<<<<<<<<<<
 *             return stmts
 *         elif parsed.error is NULL:
 */
        PyTuple_SET_ITEM(__pyx_v_stmts, __pyx_v_i, __pyx_v_item);
      }

      /* "pglast/parser.pyx":271
 *                 Py_INCREF(item)
 *                 PyTuple_SET_ITEM(stmts, i, item)
 *             return stmts             # <<<<<<<<<<<<<<
 *         elif parsed.error is NULL:
 *             return ()
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_stmts);
      __pyx_r = __pyx_v_stmts;
      goto __pyx_L6_return;

      /* "pglast/parser.pyx":265
 * 
 *     try:
 *         if parsed.tree is not NULL:             # <<<<<<<<<<<<<<
 *             stmts = PyTuple_New(parsed.tree.length)
 *             for i in range(parsed.tree.length):
 */
    }

    /* "pglast/parser.pyx":272
 *                 PyTuple_SET_ITEM(stmts, i, item)
 *             return stmts
 *         elif parsed.error is NULL:             # <<<<<<<<<<<<<<
 *             return ()
 *         else:
 */
    __pyx_t_3 = (__pyx_v_parsed.error == NULL);
    if (likely(__pyx_t_3)) {

      /* "pglast/parser.pyx":273
 *             return stmts
 *         elif parsed.error is NULL:
 *             return ()             # <<<<<<<<<<<<<<
 *         else:
 *             message = parsed.error.message.decode('utf8')
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_empty_tuple);
      __pyx_r = __pyx_empty_tuple;
      goto __pyx_L6_return;

      /* "pglast/parser.pyx":272
 *                 PyTuple_SET_ITEM(stmts, i, item)
 *             return stmts
 *         elif parsed.error is NULL:             # <<<<<<<<<<<<<<
 *             return ()
 *         else:
 */
    }

    /* "pglast/parser.pyx":275
 *             return ()
 *         else:
 *             message = parsed.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 *     finally:
 */
    /*else*/ {
      __pyx_t_7 = __pyx_v_parsed.error->message;
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_message = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":276
 *         else:
 *             message = parsed.error.message.decode('utf8')
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))             # <<<<<<<<<<<<<<
 *     finally:
 *         pg_query_exit_memory_context(mctx);
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 276, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 276, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_12 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_10};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 276, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __pyx_t_11 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_4 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_v_message, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 276, __pyx_L7_error)
    }
  }

  /* "pglast/parser.pyx":278
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 *     finally:
 *         pg_query_exit_memory_context(mctx);             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
      {
        pg_query_exit_memory_context(__pyx_v_mctx);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_13;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_19 = __pyx_r;
      __pyx_r = 0;
      pg_query_exit_memory_context(__pyx_v_mctx);
      __pyx_r = __pyx_t_19;
      __pyx_t_19 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":247
 * 
 * 
 * def parse_sql(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its abstract syntax tree."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pglast.parser.parse_sql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XDECREF(__pyx_v_stmts);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":281
 * 
 * 
 * def parse_sql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_5parse_sql_json(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_4parse_sql_json, "Parse the given ``SQL`` `query` and return its ``JSON`` encoded syntax tree.");
static PyMethodDef __pyx_mdef_6pglast_6parser_5parse_sql_json = {"parse_sql_json", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_5parse_sql_json, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_4parse_sql_json};
static PyObject *__pyx_pw_6pglast_6parser_5parse_sql_json(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_query = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_sql_json (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_query)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 281, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_sql_json") < 0)) __PYX_ERR(1, 281, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_sql_json", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 281, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.parse_sql_json", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(1, 281, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_4parse_sql_json(__pyx_self, __pyx_v_query);

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

static PyObject *__pyx_pf_6pglast_6parser_4parse_sql_json(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query) {
  PgQueryParseResult __pyx_v_parsed;
  char const *__pyx_v_cstring;
  PyObject *__pyx_v_utf8 = NULL;
  PyObject *__pyx_v_message = NULL;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_sql_json", 0);

  /* "pglast/parser.pyx":287
 *     cdef const char *cstring
 * 
 *     utf8 = query.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
 */
  if (unlikely(__pyx_v_query == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(1, 287, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":288
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 288, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":290
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse(cstring)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":291
 * 
 *     with nogil:
 *         parsed = pg_query_parse(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_v_parsed = pg_query_parse(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":290
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse(cstring)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":293
 *         parsed = pg_query_parse(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')
 */
  /*try:*/ {

    /* "pglast/parser.pyx":294
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 */
    __pyx_t_3 = (__pyx_v_parsed.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":295
 *     try:
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 */
      __pyx_t_4 = __pyx_v_parsed.error->message;
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_message = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":296
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 296, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":297
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         return parsed.parse_tree.decode('utf8')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 297, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyInt_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 297, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_8 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 297, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_message, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 297, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 297, __pyx_L7_error)

      /* "pglast/parser.pyx":294
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 */
    }

    /* "pglast/parser.pyx":299
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 *         return parsed.parse_tree.decode('utf8')             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_parsed.parse_tree;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":301
 *         return parsed.parse_tree.decode('utf8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_parse_result(parsed)
 * 
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
      {
        {
            #ifdef WITH_THREAD
            PyThreadState *_save;
            _save = NULL;
            Py_UNBLOCK_THREADS
            __Pyx_FastGIL_Remember();
            #endif
            /*try:*/ {

              /* "pglast/parser.pyx":302
 *     finally:
 *         with nogil:
 *             pg_query_free_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
              pg_query_free_parse_result(__pyx_v_parsed);
            }

            /* "pglast/parser.pyx":301
 *         return parsed.parse_tree.decode('utf8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_parse_result(parsed)
 * 
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_FastGIL_Forget();
                Py_BLOCK_THREADS
                #endif
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_18 = __pyx_r;
      __pyx_r = 0;
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pglast/parser.pyx":302
 *     finally:
 *         with nogil:
 *             pg_query_free_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            pg_query_free_parse_result(__pyx_v_parsed);
          }

          /* "pglast/parser.pyx":301
 *         return parsed.parse_tree.decode('utf8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_parse_result(parsed)
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":281
 * 
 * 
 * def parse_sql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pglast.parser.parse_sql_json", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":305
 * 
 * 
 * def parse_sql_protobuf(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``protobuf`` encoded syntax tree."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_7parse_sql_protobuf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_6parse_sql_protobuf, "Parse the given ``SQL`` `query` and return its ``protobuf`` encoded syntax tree.");
static PyMethodDef __pyx_mdef_6pglast_6parser_7parse_sql_protobuf = {"parse_sql_protobuf", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_7parse_sql_protobuf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_6parse_sql_protobuf};
static PyObject *__pyx_pw_6pglast_6parser_7parse_sql_protobuf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_query = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_sql_protobuf (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_query)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 305, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_sql_protobuf") < 0)) __PYX_ERR(1, 305, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_sql_protobuf", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 305, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.parse_sql_protobuf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(1, 305, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_6parse_sql_protobuf(__pyx_self, __pyx_v_query);

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

static PyObject *__pyx_pf_6pglast_6parser_6parse_sql_protobuf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query) {
  PgQueryProtobufParseResult __pyx_v_parsed;
  char const *__pyx_v_cstring;
  PyObject *__pyx_v_utf8 = NULL;
  PyObject *__pyx_v_message = NULL;
  CYTHON_UNUSED int __pyx_v_cursorpos;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_sql_protobuf", 0);

  /* "pglast/parser.pyx":311
 *     cdef const char *cstring
 * 
 *     utf8 = query.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
 */
  if (unlikely(__pyx_v_query == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(1, 311, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":312
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 312, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":314
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_protobuf(cstring)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":315
 * 
 *     with nogil:
 *         parsed = pg_query_parse_protobuf(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_v_parsed = pg_query_parse_protobuf(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":314
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_protobuf(cstring)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":317
 *         parsed = pg_query_parse_protobuf(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')
 */
  /*try:*/ {

    /* "pglast/parser.pyx":318
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf8')
 *             cursorpos = parsed.error.cursorpos
 */
    __pyx_t_3 = (__pyx_v_parsed.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":319
 *     try:
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             cursorpos = parsed.error.cursorpos
 *             offset_to_index = Displacements(query)
 */
      __pyx_t_4 = __pyx_v_parsed.error->message;
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 319, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_message = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":320
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')
 *             cursorpos = parsed.error.cursorpos             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 */
      __pyx_t_5 = __pyx_v_parsed.error->cursorpos;
      __pyx_v_cursorpos = __pyx_t_5;

      /* "pglast/parser.pyx":321
 *             message = parsed.error.message.decode('utf8')
 *             cursorpos = parsed.error.cursorpos
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 321, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":322
 *             cursorpos = parsed.error.cursorpos
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         return PyBytes_FromStringAndSize(parsed.parse_tree.data, parsed.parse_tree.len)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 322, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 322, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_9 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_10 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 322, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_message, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 322, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 322, __pyx_L7_error)

      /* "pglast/parser.pyx":318
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf8')
 *             cursorpos = parsed.error.cursorpos
 */
    }

    /* "pglast/parser.pyx":324
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 *         return PyBytes_FromStringAndSize(parsed.parse_tree.data, parsed.parse_tree.len)             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyBytes_FromStringAndSize(__pyx_v_parsed.parse_tree.data, __pyx_v_parsed.parse_tree.len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 324, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":326
 *         return PyBytes_FromStringAndSize(parsed.parse_tree.data, parsed.parse_tree.len)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_protobuf_parse_result(parsed)
 * 
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __pyx_t_5 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
      {
        {
            #ifdef WITH_THREAD
            PyThreadState *_save;
            _save = NULL;
            Py_UNBLOCK_THREADS
            __Pyx_FastGIL_Remember();
            #endif
            /*try:*/ {

              /* "pglast/parser.pyx":327
 *     finally:
 *         with nogil:
 *             pg_query_free_protobuf_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
              pg_query_free_protobuf_parse_result(__pyx_v_parsed);
            }

            /* "pglast/parser.pyx":326
 *         return PyBytes_FromStringAndSize(parsed.parse_tree.data, parsed.parse_tree.len)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_protobuf_parse_result(parsed)
 * 
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_FastGIL_Forget();
                Py_BLOCK_THREADS
                #endif
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_18 = __pyx_r;
      __pyx_r = 0;
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pglast/parser.pyx":327
 *     finally:
 *         with nogil:
 *             pg_query_free_protobuf_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            pg_query_free_protobuf_parse_result(__pyx_v_parsed);
          }

          /* "pglast/parser.pyx":326
 *         return PyBytes_FromStringAndSize(parsed.parse_tree.data, parsed.parse_tree.len)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_protobuf_parse_result(parsed)
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":305
 * 
 * 
 * def parse_sql_protobuf(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``protobuf`` encoded syntax tree."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pglast.parser.parse_sql_protobuf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":330
 * 
 * 
 * def parse_plpgsql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``pgpgsql`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_9parse_plpgsql_json(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_8parse_plpgsql_json, "Parse the given ``pgpgsql`` `query` and return its ``JSON`` encoded syntax tree.");
static PyMethodDef __pyx_mdef_6pglast_6parser_9parse_plpgsql_json = {"parse_plpgsql_json", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_9parse_plpgsql_json, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_8parse_plpgsql_json};
static PyObject *__pyx_pw_6pglast_6parser_9parse_plpgsql_json(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_query = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_plpgsql_json (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_query)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 330, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse_plpgsql_json") < 0)) __PYX_ERR(1, 330, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_plpgsql_json", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 330, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.parse_plpgsql_json", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(1, 330, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_8parse_plpgsql_json(__pyx_self, __pyx_v_query);

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

static PyObject *__pyx_pf_6pglast_6parser_8parse_plpgsql_json(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query) {
  PgQueryPlpgsqlParseResult __pyx_v_parsed;
  char const *__pyx_v_cstring;
  PyObject *__pyx_v_utf8 = NULL;
  PyObject *__pyx_v_message = NULL;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_plpgsql_json", 0);

  /* "pglast/parser.pyx":336
 *     cdef const char *cstring
 * 
 *     utf8 = query.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
 */
  if (unlikely(__pyx_v_query == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(1, 336, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":337
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 337, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":339
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_plpgsql(cstring)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":340
 * 
 *     with nogil:
 *         parsed = pg_query_parse_plpgsql(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_v_parsed = pg_query_parse_plpgsql(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":339
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_plpgsql(cstring)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":342
 *         parsed = pg_query_parse_plpgsql(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')
 */
  /*try:*/ {

    /* "pglast/parser.pyx":343
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 */
    __pyx_t_3 = (__pyx_v_parsed.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":344
 *     try:
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 */
      __pyx_t_4 = __pyx_v_parsed.error->message;
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 344, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_message = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":345
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 345, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":346
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         return parsed.plpgsql_funcs.decode('utf8')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 346, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyInt_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 346, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_8 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 346, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_message, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 346, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 346, __pyx_L7_error)

      /* "pglast/parser.pyx":343
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 */
    }

    /* "pglast/parser.pyx":348
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 *         return parsed.plpgsql_funcs.decode('utf8')             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_parsed.plpgsql_funcs;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 348, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":350
 *         return parsed.plpgsql_funcs.decode('utf8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_plpgsql_parse_result(parsed)
 * 
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
      {
        {
            #ifdef WITH_THREAD
            PyThreadState *_save;
            _save = NULL;
            Py_UNBLOCK_THREADS
            __Pyx_FastGIL_Remember();
            #endif
            /*try:*/ {

              /* "pglast/parser.pyx":351
 *     finally:
 *         with nogil:
 *             pg_query_free_plpgsql_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
              pg_query_free_plpgsql_parse_result(__pyx_v_parsed);
            }

            /* "pglast/parser.pyx":350
 *         return parsed.plpgsql_funcs.decode('utf8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_plpgsql_parse_result(parsed)
 * 
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_FastGIL_Forget();
                Py_BLOCK_THREADS
                #endif
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_18 = __pyx_r;
      __pyx_r = 0;
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pglast/parser.pyx":351
 *     finally:
 *         with nogil:
 *             pg_query_free_plpgsql_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            pg_query_free_plpgsql_parse_result(__pyx_v_parsed);
          }

          /* "pglast/parser.pyx":350
 *         return parsed.plpgsql_funcs.decode('utf8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_plpgsql_parse_result(parsed)
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":330
 * 
 * 
 * def parse_plpgsql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``pgpgsql`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pglast.parser.parse_plpgsql_json", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":354
 * 
 * 
 * def fingerprint(str query):             # <<<<<<<<<<<<<<
 *     "Compute and return a *signature* of the given ``SQL`` `query`."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_11fingerprint(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_10fingerprint, "Compute and return a *signature* of the given ``SQL`` `query`.");
static PyMethodDef __pyx_mdef_6pglast_6parser_11fingerprint = {"fingerprint", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_11fingerprint, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_10fingerprint};
static PyObject *__pyx_pw_6pglast_6parser_11fingerprint(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_query = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fingerprint (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_query)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 354, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fingerprint") < 0)) __PYX_ERR(1, 354, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fingerprint", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 354, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.fingerprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(1, 354, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_10fingerprint(__pyx_self, __pyx_v_query);

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

static PyObject *__pyx_pf_6pglast_6parser_10fingerprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query) {
  PgQueryFingerprintResult __pyx_v_result;
  char const *__pyx_v_cstring;
  PyObject *__pyx_v_utf8 = NULL;
  PyObject *__pyx_v_message = NULL;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fingerprint", 0);

  /* "pglast/parser.pyx":360
 *     cdef const char *cstring
 * 
 *     utf8 = query.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
 */
  if (unlikely(__pyx_v_query == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(1, 360, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":361
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 361, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":363
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result = pg_query_fingerprint(cstring)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":364
 * 
 *     with nogil:
 *         result = pg_query_fingerprint(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_v_result = pg_query_fingerprint(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":363
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result = pg_query_fingerprint(cstring)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":366
 *         result = pg_query_fingerprint(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if result.error:
 *             message = result.error.message.decode('utf8')
 */
  /*try:*/ {

    /* "pglast/parser.pyx":367
 * 
 *     try:
 *         if result.error:             # <<<<<<<<<<<<<<
 *             message = result.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 */
    __pyx_t_3 = (__pyx_v_result.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":368
 *     try:
 *         if result.error:
 *             message = result.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(result.error.cursorpos-1))
 */
      __pyx_t_4 = __pyx_v_result.error->message;
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 368, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_message = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":369
 *         if result.error:
 *             message = result.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(result.error.cursorpos-1))
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":370
 *             message = result.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(result.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         return result.fingerprint_str.decode('ascii')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 370, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyInt_From_long((__pyx_v_result.error->cursorpos - 1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 370, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_8 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 370, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_message, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 370, __pyx_L7_error)

      /* "pglast/parser.pyx":367
 * 
 *     try:
 *         if result.error:             # <<<<<<<<<<<<<<
 *             message = result.error.message.decode('utf8')
 *             offset_to_index = Displacements(query)
 */
    }

    /* "pglast/parser.pyx":372
 *             raise ParseError(message, offset_to_index(result.error.cursorpos-1))
 * 
 *         return result.fingerprint_str.decode('ascii')             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_result.fingerprint_str;
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":374
 *         return result.fingerprint_str.decode('ascii')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_fingerprint_result(result)
 * 
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
      {
        {
            #ifdef WITH_THREAD
            PyThreadState *_save;
            _save = NULL;
            Py_UNBLOCK_THREADS
            __Pyx_FastGIL_Remember();
            #endif
            /*try:*/ {

              /* "pglast/parser.pyx":375
 *     finally:
 *         with nogil:
 *             pg_query_free_fingerprint_result(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
              pg_query_free_fingerprint_result(__pyx_v_result);
            }

            /* "pglast/parser.pyx":374
 *         return result.fingerprint_str.decode('ascii')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_fingerprint_result(result)
 * 
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_FastGIL_Forget();
                Py_BLOCK_THREADS
                #endif
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_18 = __pyx_r;
      __pyx_r = 0;
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pglast/parser.pyx":375
 *     finally:
 *         with nogil:
 *             pg_query_free_fingerprint_result(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            pg_query_free_fingerprint_result(__pyx_v_result);
          }

          /* "pglast/parser.pyx":374
 *         return result.fingerprint_str.decode('ascii')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_fingerprint_result(result)
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":354
 * 
 * 
 * def fingerprint(str query):             # <<<<<<<<<<<<<<
 *     "Compute and return a *signature* of the given ``SQL`` `query`."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pglast.parser.fingerprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":378
 * 
 * 
 * def split(str stmts, bint with_parser=True, bint only_slices=False):             # <<<<<<<<<<<<<<
 *     """Split the given `stmts` string into a sequence of the single ``SQL`` statements.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_13split(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_12split, "Split the given `stmts` string into a sequence of the single ``SQL`` statements.\n\n    By default this uses the *parser* to perform the job; when `with_parser` is ``False``\n    the *scanner* variant is used, indicated when the statements may contain parse errors.\n\n    When `only_slices` is ``True``, return a sequence of ``slice`` instances, one for each\n    statement, instead of statements text.\n\n    NB: leading and trailing whitespace are removed from the statements.\n    ");
static PyMethodDef __pyx_mdef_6pglast_6parser_13split = {"split", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_13split, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_12split};
static PyObject *__pyx_pw_6pglast_6parser_13split(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stmts = 0;
  int __pyx_v_with_parser;
  int __pyx_v_only_slices;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("split (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stmts,&__pyx_n_s_with_parser,&__pyx_n_s_only_slices,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stmts,&__pyx_n_s_with_parser,&__pyx_n_s_only_slices,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stmts)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_with_parser);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_only_slices);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "split") < 0)) __PYX_ERR(1, 378, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_stmts = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_with_parser = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_with_parser == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L3_error)
    } else {
      __pyx_v_with_parser = ((int)((int)1));
    }
    if (values[2]) {
      __pyx_v_only_slices = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_only_slices == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L3_error)
    } else {
      __pyx_v_only_slices = ((int)((int)0));
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("split", 0, 1, 3, __pyx_nargs); __PYX_ERR(1, 378, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stmts), (&PyUnicode_Type), 1, "stmts", 1))) __PYX_ERR(1, 378, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_12split(__pyx_self, __pyx_v_stmts, __pyx_v_with_parser, __pyx_v_only_slices);

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

static PyObject *__pyx_pf_6pglast_6parser_12split(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stmts, int __pyx_v_with_parser, int __pyx_v_only_slices) {
  PgQuerySplitResult __pyx_v_splitted;
  char const *__pyx_v_cstring;
  int __pyx_v_i;
  int __pyx_v_prev_offset;
  int __pyx_v_start;
  int __pyx_v_end;
  PyObject *__pyx_v_utf8 = NULL;
  PyObject *__pyx_v_message = NULL;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_stmt = NULL;
  PyObject *__pyx_v_cur_offset = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  char const *__pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("split", 0);

  /* "pglast/parser.pyx":392
 *     cdef PgQuerySplitResult splitted
 *     cdef const char *cstring
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int prev_offset = 0
 *     cdef int start
 */
  __pyx_v_i = 0;

  /* "pglast/parser.pyx":393
 *     cdef const char *cstring
 *     cdef int i = 0
 *     cdef int prev_offset = 0             # <<<<<<<<<<<<<<
 *     cdef int start
 *     cdef int end
 */
  __pyx_v_prev_offset = 0;

  /* "pglast/parser.pyx":397
 *     cdef int end
 * 
 *     utf8 = stmts.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
 */
  if (unlikely(__pyx_v_stmts == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(1, 397, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_stmts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":398
 * 
 *     utf8 = stmts.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 398, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":400
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         if with_parser:
 *             splitted = pg_query_split_with_parser(cstring)
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":401
 * 
 *     with nogil:
 *         if with_parser:             # <<<<<<<<<<<<<<
 *             splitted = pg_query_split_with_parser(cstring)
 *         else:
 */
        if (__pyx_v_with_parser) {

          /* "pglast/parser.pyx":402
 *     with nogil:
 *         if with_parser:
 *             splitted = pg_query_split_with_parser(cstring)             # <<<<<<<<<<<<<<
 *         else:
 *             splitted = pg_query_split_with_scanner(cstring)
 */
          __pyx_v_splitted = pg_query_split_with_parser(__pyx_v_cstring);

          /* "pglast/parser.pyx":401
 * 
 *     with nogil:
 *         if with_parser:             # <<<<<<<<<<<<<<
 *             splitted = pg_query_split_with_parser(cstring)
 *         else:
 */
          goto __pyx_L6;
        }

        /* "pglast/parser.pyx":404
 *             splitted = pg_query_split_with_parser(cstring)
 *         else:
 *             splitted = pg_query_split_with_scanner(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        /*else*/ {
          __pyx_v_splitted = pg_query_split_with_scanner(__pyx_v_cstring);
        }
        __pyx_L6:;
      }

      /* "pglast/parser.pyx":400
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         if with_parser:
 *             splitted = pg_query_split_with_parser(cstring)
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":406
 *             splitted = pg_query_split_with_scanner(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if splitted.error:
 *             message = splitted.error.message.decode('utf8')
 */
  /*try:*/ {

    /* "pglast/parser.pyx":407
 * 
 *     try:
 *         if splitted.error:             # <<<<<<<<<<<<<<
 *             message = splitted.error.message.decode('utf8')
 *             offset_to_index = Displacements(stmts)
 */
    __pyx_t_3 = (__pyx_v_splitted.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":408
 *     try:
 *         if splitted.error:
 *             message = splitted.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(stmts)
 *             raise ParseError(message, offset_to_index(splitted.error.cursorpos-1))
 */
      __pyx_t_4 = __pyx_v_splitted.error->message;
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 408, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_message = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":409
 *         if splitted.error:
 *             message = splitted.error.message.decode('utf8')
 *             offset_to_index = Displacements(stmts)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(splitted.error.cursorpos-1))
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_v_stmts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":410
 *             message = splitted.error.message.decode('utf8')
 *             offset_to_index = Displacements(stmts)
 *             raise ParseError(message, offset_to_index(splitted.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         result = []
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 410, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyInt_From_long((__pyx_v_splitted.error->cursorpos - 1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 410, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_8 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 410, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_message, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 410, __pyx_L8_error)

      /* "pglast/parser.pyx":407
 * 
 *     try:
 *         if splitted.error:             # <<<<<<<<<<<<<<
 *             message = splitted.error.message.decode('utf8')
 *             offset_to_index = Displacements(stmts)
 */
    }

    /* "pglast/parser.pyx":412
 *             raise ParseError(message, offset_to_index(splitted.error.cursorpos-1))
 * 
 *         result = []             # <<<<<<<<<<<<<<
 *         while i < splitted.n_stmts:
 *             start = splitted.stmts[i].stmt_location
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 412, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pglast/parser.pyx":413
 * 
 *         result = []
 *         while i < splitted.n_stmts:             # <<<<<<<<<<<<<<
 *             start = splitted.stmts[i].stmt_location
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 */
    while (1) {
      __pyx_t_3 = (__pyx_v_i < __pyx_v_splitted.n_stmts);
      if (!__pyx_t_3) break;

      /* "pglast/parser.pyx":414
 *         result = []
 *         while i < splitted.n_stmts:
 *             start = splitted.stmts[i].stmt_location             # <<<<<<<<<<<<<<
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 *             stmt = utf8[start:end].decode('utf-8').strip()
 */
      __pyx_t_10 = (__pyx_v_splitted.stmts[__pyx_v_i])->stmt_location;
      __pyx_v_start = __pyx_t_10;

      /* "pglast/parser.pyx":415
 *         while i < splitted.n_stmts:
 *             start = splitted.stmts[i].stmt_location
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len             # <<<<<<<<<<<<<<
 *             stmt = utf8[start:end].decode('utf-8').strip()
 *             if only_slices:
 */
      __pyx_v_end = ((__pyx_v_splitted.stmts[__pyx_v_i])->stmt_location + (__pyx_v_splitted.stmts[__pyx_v_i])->stmt_len);

      /* "pglast/parser.pyx":416
 *             start = splitted.stmts[i].stmt_location
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 *             stmt = utf8[start:end].decode('utf-8').strip()             # <<<<<<<<<<<<<<
 *             if only_slices:
 *                 # Adjust offsets, we remove leading/trailing whitespace above
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_utf8, __pyx_v_start, __pyx_v_end, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 416, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 416, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_u_utf_8};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 416, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 416, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_5, };
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 416, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_stmt, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":417
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 *             stmt = utf8[start:end].decode('utf-8').strip()
 *             if only_slices:             # <<<<<<<<<<<<<<
 *                 # Adjust offsets, we remove leading/trailing whitespace above
 *                 cur_offset = stmts.index(stmt, prev_offset)
 */
      if (__pyx_v_only_slices) {

        /* "pglast/parser.pyx":419
 *             if only_slices:
 *                 # Adjust offsets, we remove leading/trailing whitespace above
 *                 cur_offset = stmts.index(stmt, prev_offset)             # <<<<<<<<<<<<<<
 *                 result.append(slice(cur_offset, cur_offset + len(stmt)))
 *                 prev_offset = cur_offset + 1
 */
        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_prev_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyUnicode_Type_index, __pyx_v_stmts, __pyx_v_stmt, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 419, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_cur_offset, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "pglast/parser.pyx":420
 *                 # Adjust offsets, we remove leading/trailing whitespace above
 *                 cur_offset = stmts.index(stmt, prev_offset)
 *                 result.append(slice(cur_offset, cur_offset + len(stmt)))             # <<<<<<<<<<<<<<
 *                 prev_offset = cur_offset + 1
 *             else:
 */
        __pyx_t_11 = PyObject_Length(__pyx_v_stmt); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(1, 420, __pyx_L8_error)
        __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 420, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = PyNumber_Add(__pyx_v_cur_offset, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 420, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PySlice_New(__pyx_v_cur_offset, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 420, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_8); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 420, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pglast/parser.pyx":421
 *                 cur_offset = stmts.index(stmt, prev_offset)
 *                 result.append(slice(cur_offset, cur_offset + len(stmt)))
 *                 prev_offset = cur_offset + 1             # <<<<<<<<<<<<<<
 *             else:
 *                 result.append(stmt)
 */
        __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_cur_offset, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 421, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 421, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_prev_offset = __pyx_t_10;

        /* "pglast/parser.pyx":417
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 *             stmt = utf8[start:end].decode('utf-8').strip()
 *             if only_slices:             # <<<<<<<<<<<<<<
 *                 # Adjust offsets, we remove leading/trailing whitespace above
 *                 cur_offset = stmts.index(stmt, prev_offset)
 */
        goto __pyx_L13;
      }

      /* "pglast/parser.pyx":423
 *                 prev_offset = cur_offset + 1
 *             else:
 *                 result.append(stmt)             # <<<<<<<<<<<<<<
 *             i += 1
 *         return tuple(result)
 */
      /*else*/ {
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_stmt); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 423, __pyx_L8_error)
      }
      __pyx_L13:;

      /* "pglast/parser.pyx":424
 *             else:
 *                 result.append(stmt)
 *             i += 1             # <<<<<<<<<<<<<<
 *         return tuple(result)
 *     finally:
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "pglast/parser.pyx":425
 *                 result.append(stmt)
 *             i += 1
 *         return tuple(result)             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 425, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L7_return;
  }

  /* "pglast/parser.pyx":427
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_split_result(splitted)
 * 
 */
  /*finally:*/ {
    __pyx_L8_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
      {
        {
            #ifdef WITH_THREAD
            PyThreadState *_save;
            _save = NULL;
            Py_UNBLOCK_THREADS
            __Pyx_FastGIL_Remember();
            #endif
            /*try:*/ {

              /* "pglast/parser.pyx":428
 *     finally:
 *         with nogil:
 *             pg_query_free_split_result(splitted)             # <<<<<<<<<<<<<<
 * 
 * 
 */
              pg_query_free_split_result(__pyx_v_splitted);
            }

            /* "pglast/parser.pyx":427
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_split_result(splitted)
 * 
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_FastGIL_Forget();
                Py_BLOCK_THREADS
                #endif
                goto __pyx_L18;
              }
              __pyx_L18:;
            }
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
      }
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
      goto __pyx_L1_error;
    }
    __pyx_L7_return: {
      __pyx_t_20 = __pyx_r;
      __pyx_r = 0;
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pglast/parser.pyx":428
 *     finally:
 *         with nogil:
 *             pg_query_free_split_result(splitted)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            pg_query_free_split_result(__pyx_v_splitted);
          }

          /* "pglast/parser.pyx":427
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_split_result(splitted)
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L21;
            }
            __pyx_L21:;
          }
      }
      __pyx_r = __pyx_t_20;
      __pyx_t_20 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":378
 * 
 * 
 * def split(str stmts, bint with_parser=True, bint only_slices=False):             # <<<<<<<<<<<<<<
 *     """Split the given `stmts` string into a sequence of the single ``SQL`` statements.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pglast.parser.split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_stmt);
  __Pyx_XDECREF(__pyx_v_cur_offset);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":431
 * 
 * 
 * def deparse_protobuf(bytes protobuf):             # <<<<<<<<<<<<<<
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_15deparse_protobuf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_14deparse_protobuf, "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement.");
static PyMethodDef __pyx_mdef_6pglast_6parser_15deparse_protobuf = {"deparse_protobuf", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_15deparse_protobuf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_14deparse_protobuf};
static PyObject *__pyx_pw_6pglast_6parser_15deparse_protobuf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_protobuf = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deparse_protobuf (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protobuf,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protobuf,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_protobuf)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 431, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "deparse_protobuf") < 0)) __PYX_ERR(1, 431, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_protobuf = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deparse_protobuf", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 431, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.deparse_protobuf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_protobuf), (&PyBytes_Type), 1, "protobuf", 1))) __PYX_ERR(1, 431, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_14deparse_protobuf(__pyx_self, __pyx_v_protobuf);

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

static PyObject *__pyx_pf_6pglast_6parser_14deparse_protobuf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_protobuf) {
  PgQueryProtobuf __pyx_v_tree;
  PgQueryDeparseResult __pyx_v_deparsed;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  char *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deparse_protobuf", 0);

  /* "pglast/parser.pyx":437
 *     cdef PgQueryDeparseResult deparsed
 * 
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)             # <<<<<<<<<<<<<<
 *     with nogil:
 *          deparsed = pg_query_deparse_protobuf(tree)
 */
  __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_protobuf, (&__pyx_v_tree.data), ((Py_ssize_t *)(&__pyx_v_tree.len))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 437, __pyx_L1_error)

  /* "pglast/parser.pyx":438
 * 
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)
 *     with nogil:             # <<<<<<<<<<<<<<
 *          deparsed = pg_query_deparse_protobuf(tree)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":439
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)
 *     with nogil:
 *          deparsed = pg_query_deparse_protobuf(tree)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_v_deparsed = pg_query_deparse_protobuf(__pyx_v_tree);
      }

      /* "pglast/parser.pyx":438
 * 
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)
 *     with nogil:             # <<<<<<<<<<<<<<
 *          deparsed = pg_query_deparse_protobuf(tree)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":441
 *          deparsed = pg_query_deparse_protobuf(tree)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if deparsed.error:
 *             message = deparsed.error.message.decode('utf8')
 */
  /*try:*/ {

    /* "pglast/parser.pyx":442
 * 
 *     try:
 *         if deparsed.error:             # <<<<<<<<<<<<<<
 *             message = deparsed.error.message.decode('utf8')
 *             raise DeparseError(message, deparsed.error.cursorpos)
 */
    __pyx_t_2 = (__pyx_v_deparsed.error != 0);
    if (unlikely(__pyx_t_2)) {

      /* "pglast/parser.pyx":443
 *     try:
 *         if deparsed.error:
 *             message = deparsed.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             raise DeparseError(message, deparsed.error.cursorpos)
 * 
 */
      __pyx_t_3 = __pyx_v_deparsed.error->message;
      __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 443, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_message = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "pglast/parser.pyx":444
 *         if deparsed.error:
 *             message = deparsed.error.message.decode('utf8')
 *             raise DeparseError(message, deparsed.error.cursorpos)             # <<<<<<<<<<<<<<
 * 
 *         return deparsed.query.decode('utf-8')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DeparseError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 444, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_deparsed.error->cursorpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 444, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_1 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_1 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_message, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_1, 2+__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 444, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(1, 444, __pyx_L7_error)

      /* "pglast/parser.pyx":442
 * 
 *     try:
 *         if deparsed.error:             # <<<<<<<<<<<<<<
 *             message = deparsed.error.message.decode('utf8')
 *             raise DeparseError(message, deparsed.error.cursorpos)
 */
    }

    /* "pglast/parser.pyx":446
 *             raise DeparseError(message, deparsed.error.cursorpos)
 * 
 *         return deparsed.query.decode('utf-8')             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_deparsed.query;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 446, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":448
 *         return deparsed.query.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_result(deparsed)
 * 
 */
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_1 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        {
            #ifdef WITH_THREAD
            PyThreadState *_save;
            _save = NULL;
            Py_UNBLOCK_THREADS
            __Pyx_FastGIL_Remember();
            #endif
            /*try:*/ {

              /* "pglast/parser.pyx":449
 *     finally:
 *         with nogil:
 *             pg_query_free_deparse_result(deparsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
              pg_query_free_deparse_result(__pyx_v_deparsed);
            }

            /* "pglast/parser.pyx":448
 *         return deparsed.query.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_result(deparsed)
 * 
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_FastGIL_Forget();
                Py_BLOCK_THREADS
                #endif
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pglast/parser.pyx":449
 *     finally:
 *         with nogil:
 *             pg_query_free_deparse_result(deparsed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            pg_query_free_deparse_result(__pyx_v_deparsed);
          }

          /* "pglast/parser.pyx":448
 *         return deparsed.query.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_result(deparsed)
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":431
 * 
 * 
 * def deparse_protobuf(bytes protobuf):             # <<<<<<<<<<<<<<
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.deparse_protobuf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":455
 * 
 * 
 * def scan(str query):             # <<<<<<<<<<<<<<
 *     "Lexify the given ``SQL`` `query` and return a list of its lexical tokens."
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_17scan(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6pglast_6parser_16scan, "Lexify the given ``SQL`` `query` and return a list of its lexical tokens.");
static PyMethodDef __pyx_mdef_6pglast_6parser_17scan = {"scan", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_17scan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_16scan};
static PyObject *__pyx_pw_6pglast_6parser_17scan(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_query = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scan (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query,0};
    #endif
    PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_query)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 455, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "scan") < 0)) __PYX_ERR(1, 455, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("scan", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 455, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.scan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyUnicode_Type), 1, "query", 1))) __PYX_ERR(1, 455, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_16scan(__pyx_self, __pyx_v_query);

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

static PyObject *__pyx_pf_6pglast_6parser_16scan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query) {
  PgQueryScanResult __pyx_v_scanned;
  PgQuery__ScanResult *__pyx_v_scan_result;
  PgQuery__ScanToken *__pyx_v_scan_token;
  ProtobufCEnumValue const *__pyx_v_tkind;
  ProtobufCEnumValue const *__pyx_v_kwkind;
  char const *__pyx_v_cstring;
  size_t __pyx_v_i;
  PyObject *__pyx_v_utf8 = NULL;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_token = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  size_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  char const *__pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scan", 0);

  /* "pglast/parser.pyx":466
 *     cdef size_t i
 * 
 *     utf8 = query.encode('utf-8')             # <<<<<<<<<<<<<<
 *     offset_to_index = Displacements(query)
 *     cstring = utf8
 */
  if (unlikely(__pyx_v_query == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(1, 466, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":467
 * 
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":468
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 468, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":470
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         scanned = pg_query_scan(cstring)
 * 
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      _save = NULL;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "pglast/parser.pyx":471
 * 
 *     with nogil:
 *         scanned = pg_query_scan(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_v_scanned = pg_query_scan(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":470
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         scanned = pg_query_scan(cstring)
 * 
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":473
 *         scanned = pg_query_scan(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if scanned.error:
 *             message = scanned.error.message.decode('utf8')
 */
  /*try:*/ {

    /* "pglast/parser.pyx":474
 * 
 *     try:
 *         if scanned.error:             # <<<<<<<<<<<<<<
 *             message = scanned.error.message.decode('utf8')
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
 */
    __pyx_t_3 = (__pyx_v_scanned.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":475
 *     try:
 *         if scanned.error:
 *             message = scanned.error.message.decode('utf8')             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
 * 
 */
      __pyx_t_4 = __pyx_v_scanned.error->message;
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_message = __pyx_t_1;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":476
 *         if scanned.error:
 *             message = scanned.error.message.decode('utf8')
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ParseError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 476, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyInt_From_long((__pyx_v_scanned.error->cursorpos - 1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 476, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_8 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 476, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_message, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 476, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(1, 476, __pyx_L7_error)

      /* "pglast/parser.pyx":474
 * 
 *     try:
 *         if scanned.error:             # <<<<<<<<<<<<<<
 *             message = scanned.error.message.decode('utf8')
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
 */
    }

    /* "pglast/parser.pyx":478
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             scan_result = pg_query__scan_result__unpack(NULL, scanned.pbuf.len,
 *                                                         <uint8_t*> scanned.pbuf.data)
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        _save = NULL;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "pglast/parser.pyx":479
 * 
 *         with nogil:
 *             scan_result = pg_query__scan_result__unpack(NULL, scanned.pbuf.len,             # <<<<<<<<<<<<<<
 *                                                         <uint8_t*> scanned.pbuf.data)
 * 
 */
          __pyx_v_scan_result = pg_query__scan_result__unpack(NULL, __pyx_v_scanned.pbuf.len, ((uint8_t *)__pyx_v_scanned.pbuf.data));
        }

        /* "pglast/parser.pyx":478
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             scan_result = pg_query__scan_result__unpack(NULL, scanned.pbuf.len,
 *                                                         <uint8_t*> scanned.pbuf.data)
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L12;
          }
          __pyx_L12:;
        }
    }

    /* "pglast/parser.pyx":482
 *                                                         <uint8_t*> scanned.pbuf.data)
 * 
 *         result = PyList_New(scan_result.n_tokens)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(scan_result.n_tokens):
 */
    __pyx_t_1 = PyList_New(__pyx_v_scan_result->n_tokens); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pglast/parser.pyx":484
 *         result = PyList_New(scan_result.n_tokens)
 * 
 *         for i in range(scan_result.n_tokens):             # <<<<<<<<<<<<<<
 *             scan_token = scan_result.tokens[i]
 *             tkind = protobuf_c_enum_descriptor_get_value(&pg_query__token__descriptor,
 */
    __pyx_t_11 = __pyx_v_scan_result->n_tokens;
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "pglast/parser.pyx":485
 * 
 *         for i in range(scan_result.n_tokens):
 *             scan_token = scan_result.tokens[i]             # <<<<<<<<<<<<<<
 *             tkind = protobuf_c_enum_descriptor_get_value(&pg_query__token__descriptor,
 *                                                          scan_token.token)
 */
      __pyx_v_scan_token = (__pyx_v_scan_result->tokens[__pyx_v_i]);

      /* "pglast/parser.pyx":486
 *         for i in range(scan_result.n_tokens):
 *             scan_token = scan_result.tokens[i]
 *             tkind = protobuf_c_enum_descriptor_get_value(&pg_query__token__descriptor,             # <<<<<<<<<<<<<<
 *                                                          scan_token.token)
 *             kwkind = protobuf_c_enum_descriptor_get_value(&pg_query__keyword_kind__descriptor,
 */
      __pyx_v_tkind = protobuf_c_enum_descriptor_get_value((&pg_query__token__descriptor), __pyx_v_scan_token->token);

      /* "pglast/parser.pyx":488
 *             tkind = protobuf_c_enum_descriptor_get_value(&pg_query__token__descriptor,
 *                                                          scan_token.token)
 *             kwkind = protobuf_c_enum_descriptor_get_value(&pg_query__keyword_kind__descriptor,             # <<<<<<<<<<<<<<
 *                                                           scan_token.keyword_kind)
 * 
 */
      __pyx_v_kwkind = protobuf_c_enum_descriptor_get_value((&pg_query__keyword_kind__descriptor), __pyx_v_scan_token->keyword_kind);

      /* "pglast/parser.pyx":491
 *                                                           scan_token.keyword_kind)
 * 
 *             token = Token(offset_to_index(scan_token.start), offset_to_index(scan_token.end-1),             # <<<<<<<<<<<<<<
 *                           tkind.name.decode('ascii') if tkind != NULL else "UNKNOWN",
 *                           kwkind.name.decode('ascii'))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Token); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 491, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyInt_From_int32_t(__pyx_v_scan_token->start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 491, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_7 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 491, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_scan_token->end - 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 491, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_9 = ((PyObject *)__pyx_v_offset_to_index); __pyx_t_14 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_8};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 491, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }

      /* "pglast/parser.pyx":492
 * 
 *             token = Token(offset_to_index(scan_token.start), offset_to_index(scan_token.end-1),
 *                           tkind.name.decode('ascii') if tkind != NULL else "UNKNOWN",             # <<<<<<<<<<<<<<
 *                           kwkind.name.decode('ascii'))
 *             Py_INCREF(token)
 */
      if ((__pyx_v_tkind != NULL)) {
        __pyx_t_15 = __pyx_v_tkind->name;
        __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_15, 0, strlen(__pyx_t_15), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 492, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_9 = __pyx_t_8;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __Pyx_INCREF(__pyx_n_u_UNKNOWN);
        __pyx_t_9 = __pyx_n_u_UNKNOWN;
      }

      /* "pglast/parser.pyx":493
 *             token = Token(offset_to_index(scan_token.start), offset_to_index(scan_token.end-1),
 *                           tkind.name.decode('ascii') if tkind != NULL else "UNKNOWN",
 *                           kwkind.name.decode('ascii'))             # <<<<<<<<<<<<<<
 *             Py_INCREF(token)
 *             PyList_SET_ITEM(result, i, token)
 */
      __pyx_t_15 = __pyx_v_kwkind->name;
      __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_15, 0, strlen(__pyx_t_15), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 493, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_14, __pyx_t_6, __pyx_t_7, __pyx_t_9, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":494
 *                           tkind.name.decode('ascii') if tkind != NULL else "UNKNOWN",
 *                           kwkind.name.decode('ascii'))
 *             Py_INCREF(token)             # <<<<<<<<<<<<<<
 *             PyList_SET_ITEM(result, i, token)
 * 
 */
      Py_INCREF(__pyx_v_token);

      /* "pglast/parser.pyx":495
 *                           kwkind.name.decode('ascii'))
 *             Py_INCREF(token)
 *             PyList_SET_ITEM(result, i, token)             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */
      PyList_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_token);
    }

    /* "pglast/parser.pyx":497
 *             PyList_SET_ITEM(result, i, token)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        _save = NULL;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "pglast/parser.pyx":498
 * 
 *         with nogil:
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
 */
          pg_query__scan_result__free_unpacked(__pyx_v_scan_result, NULL);
        }

        /* "pglast/parser.pyx":497
 *             PyList_SET_ITEM(result, i, token)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L17;
          }
          __pyx_L17:;
        }
    }
  }

  /* "pglast/parser.pyx":500
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_scan_result(scanned)
 * 
 */
  /*finally:*/ {
    /*normal exit:*/{
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          _save = NULL;
          Py_UNBLOCK_THREADS
          __Pyx_FastGIL_Remember();
          #endif
          /*try:*/ {

            /* "pglast/parser.pyx":501
 *     finally:
 *         with nogil:
 *             pg_query_free_scan_result(scanned)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
            pg_query_free_scan_result(__pyx_v_scanned);
          }

          /* "pglast/parser.pyx":500
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_scan_result(scanned)
 * 
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              __Pyx_FastGIL_Forget();
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L20;
            }
            __pyx_L20:;
          }
      }
      goto __pyx_L8;
    }
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __pyx_t_10 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
      {
        {
            #ifdef WITH_THREAD
            PyThreadState *_save;
            _save = NULL;
            Py_UNBLOCK_THREADS
            __Pyx_FastGIL_Remember();
            #endif
            /*try:*/ {

              /* "pglast/parser.pyx":501
 *     finally:
 *         with nogil:
 *             pg_query_free_scan_result(scanned)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
              pg_query_free_scan_result(__pyx_v_scanned);
            }

            /* "pglast/parser.pyx":500
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_scan_result(scanned)
 * 
 */
            /*finally:*/ {
              /*normal exit:*/{
                #ifdef WITH_THREAD
                __Pyx_FastGIL_Forget();
                Py_BLOCK_THREADS
                #endif
                goto __pyx_L25;
              }
              __pyx_L25:;
            }
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_21);
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_XGIVEREF(__pyx_t_23);
        __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
      }
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
      goto __pyx_L1_error;
    }
    __pyx_L8:;
  }

  /* "pglast/parser.pyx":503
 *             pg_query_free_scan_result(scanned)
 * 
 *     return result             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "pglast/parser.pyx":455
 * 
 * 
 * def scan(str query):             # <<<<<<<<<<<<<<
 *     "Lexify the given ``SQL`` `query` and return a list of its lexical tokens."
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("pglast.parser.scan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_token);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_19__pyx_unpickle_Displacements(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_6pglast_6parser_19__pyx_unpickle_Displacements = {"__pyx_unpickle_Displacements", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_19__pyx_unpickle_Displacements, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pglast_6parser_19__pyx_unpickle_Displacements(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Displacements (wrapper)", 0);
  {
    #if CYTHON_USE_MODULE_STATE
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    #endif
    PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Displacements", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Displacements", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Displacements") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Displacements", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pglast.parser.__pyx_unpickle_Displacements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pglast_6parser_18__pyx_unpickle_Displacements(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_6pglast_6parser_18__pyx_unpickle_Displacements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Displacements", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x236a782, 0x2e307f9, 0x7645d40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__2, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x236a782, 0x2e307f9, 0x7645d40):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum
 *     __pyx_result = Displacements.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x236a782, 0x2e307f9, 0x7645d40):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = Displacements.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x236a782, 0x2e307f9, 0x7645d40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum
 *     __pyx_result = Displacements.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Displacements__set_state(<Displacements> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pglast_6parser_Displacements), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum
 *     __pyx_result = Displacements.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Displacements__set_state(<Displacements> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Displacements.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Displacements__set_state(<Displacements> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Displacements__set_state(Displacements __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6pglast_6parser___pyx_unpickle_Displacements__set_state(((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum
 *     __pyx_result = Displacements.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Displacements__set_state(<Displacements> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Displacements__set_state(<Displacements> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Displacements__set_state(Displacements __pyx_result, tuple __pyx_state):
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pglast.parser.__pyx_unpickle_Displacements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Displacements__set_state(<Displacements> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Displacements__set_state(Displacements __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6pglast_6parser___pyx_unpickle_Displacements__set_state(struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned long __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Displacements__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Displacements__set_state(Displacements __pyx_result, tuple __pyx_state):
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->displacements);
  __Pyx_DECREF(__pyx_v___pyx_result->displacements);
  __pyx_v___pyx_result->displacements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_long(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->max_offset = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Displacements__set_state(Displacements __pyx_result, tuple __pyx_state):
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 > 2);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Displacements__set_state(Displacements __pyx_result, tuple __pyx_state):
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Displacements__set_state(<Displacements> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Displacements__set_state(Displacements __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pglast.parser.__pyx_unpickle_Displacements__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_6pglast_6parser_Displacements(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6pglast_6parser_Displacements *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6pglast_6parser_Displacements *)o);
  p->displacements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pglast_6parser_Displacements(PyObject *o) {
  struct __pyx_obj_6pglast_6parser_Displacements *p = (struct __pyx_obj_6pglast_6parser_Displacements *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !_PyGC_FINALIZED(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6pglast_6parser_Displacements) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->displacements);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pglast_6parser_Displacements(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pglast_6parser_Displacements *p = (struct __pyx_obj_6pglast_6parser_Displacements *)o;
  if (p->displacements) {
    e = (*v)(p->displacements, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pglast_6parser_Displacements(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6pglast_6parser_Displacements *p = (struct __pyx_obj_6pglast_6parser_Displacements *)o;
  tmp = ((PyObject*)p->displacements);
  p->displacements = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pglast_6parser_Displacements[] = {
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_13Displacements_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_13Displacements_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6pglast_6parser_Displacements_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6pglast_6parser_Displacements},
  {Py_tp_call, (void *)__pyx_pw_6pglast_6parser_13Displacements_3__call__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Helper class used to find the index of Unicode character from its offset in the\n    corresponding UTF-8 encoded array.\n\n    Example:\n\n      >>> unicode = '\342\202\254 0.01'\n      >>> utf8 = unicode.encode('utf-8')\n      >>> d = pglast.parser.Displacements(unicode)\n      >>> for offset in range(len(utf8)):\n      ...   print(f'{offset} [{utf8[offset]:2x}] -> {d(offset)} [{unicode[d(offset)]}]')\n      ...\n      0 [e2] -> 0 [\342\202\254]\n      1 [82] -> 0 [\342\202\254]\n      2 [ac] -> 0 [\342\202\254]\n      3 [20] -> 1 [ ]\n      4 [30] -> 2 [0]\n      5 [2e] -> 3 [.]\n      6 [30] -> 4 [0]\n      7 [31] -> 5 [1]\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6pglast_6parser_Displacements},
  {Py_tp_clear, (void *)__pyx_tp_clear_6pglast_6parser_Displacements},
  {Py_tp_methods, (void *)__pyx_methods_6pglast_6parser_Displacements},
  {Py_tp_init, (void *)__pyx_pw_6pglast_6parser_13Displacements_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6pglast_6parser_Displacements},
  {0, 0},
};
static PyType_Spec __pyx_type_6pglast_6parser_Displacements_spec = {
  "pglast.parser.Displacements",
  sizeof(struct __pyx_obj_6pglast_6parser_Displacements),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6pglast_6parser_Displacements_slots,
};
#else

static PyTypeObject __pyx_type_6pglast_6parser_Displacements = {
  PyVarObject_HEAD_INIT(0, 0)
  "pglast.parser.""Displacements", /*tp_name*/
  sizeof(struct __pyx_obj_6pglast_6parser_Displacements), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pglast_6parser_Displacements, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_6pglast_6parser_13Displacements_3__call__, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    Helper class used to find the index of Unicode character from its offset in the\n    corresponding UTF-8 encoded array.\n\n    Example:\n\n      >>> unicode = '\342\202\254 0.01'\n      >>> utf8 = unicode.encode('utf-8')\n      >>> d = pglast.parser.Displacements(unicode)\n      >>> for offset in range(len(utf8)):\n      ...   print(f'{offset} [{utf8[offset]:2x}] -> {d(offset)} [{unicode[d(offset)]}]')\n      ...\n      0 [e2] -> 0 [\342\202\254]\n      1 [82] -> 0 [\342\202\254]\n      2 [ac] -> 0 [\342\202\254]\n      3 [20] -> 1 [ ]\n      4 [30] -> 2 [0]\n      5 [2e] -> 3 [.]\n      6 [30] -> 4 [0]\n      7 [31] -> 5 [1]\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pglast_6parser_Displacements, /*tp_traverse*/
  __pyx_tp_clear_6pglast_6parser_Displacements, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pglast_6parser_Displacements, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6pglast_6parser_13Displacements_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pglast_6parser_Displacements, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  #if CYTHON_USE_MODULE_STATE
  {0, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  {0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0},
  {0, __pyx_k_A_ArrayExpr, sizeof(__pyx_k_A_ArrayExpr), 0, 0, 1, 1},
  {0, __pyx_k_A_Const, sizeof(__pyx_k_A_Const), 0, 0, 1, 1},
  {0, __pyx_k_A_Expr, sizeof(__pyx_k_A_Expr), 0, 0, 1, 1},
  {0, __pyx_k_A_Expr_Kind, sizeof(__pyx_k_A_Expr_Kind), 0, 1, 0, 1},
  {0, __pyx_k_A_Indices, sizeof(__pyx_k_A_Indices), 0, 0, 1, 1},
  {0, __pyx_k_A_Indirection, sizeof(__pyx_k_A_Indirection), 0, 0, 1, 1},
  {0, __pyx_k_A_Star, sizeof(__pyx_k_A_Star), 0, 0, 1, 1},
  {0, __pyx_k_AccessPriv, sizeof(__pyx_k_AccessPriv), 0, 0, 1, 1},
  {0, __pyx_k_AggSplit, sizeof(__pyx_k_AggSplit), 0, 1, 0, 1},
  {0, __pyx_k_Aggref, sizeof(__pyx_k_Aggref), 0, 0, 1, 1},
  {0, __pyx_k_Alias, sizeof(__pyx_k_Alias), 0, 0, 1, 1},
  {0, __pyx_k_AlterCollationStmt, sizeof(__pyx_k_AlterCollationStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterDatabaseRefreshCollStmt, sizeof(__pyx_k_AlterDatabaseRefreshCollStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterDatabaseSetStmt, sizeof(__pyx_k_AlterDatabaseSetStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterDatabaseStmt, sizeof(__pyx_k_AlterDatabaseStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterDefaultPrivilegesStmt, sizeof(__pyx_k_AlterDefaultPrivilegesStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterDomainStmt, sizeof(__pyx_k_AlterDomainStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterEnumStmt, sizeof(__pyx_k_AlterEnumStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterEventTrigStmt, sizeof(__pyx_k_AlterEventTrigStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterExtensionContentsStmt, sizeof(__pyx_k_AlterExtensionContentsStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterExtensionStmt, sizeof(__pyx_k_AlterExtensionStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterFdwStmt, sizeof(__pyx_k_AlterFdwStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterForeignServerStmt, sizeof(__pyx_k_AlterForeignServerStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterFunctionStmt, sizeof(__pyx_k_AlterFunctionStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterObjectDependsStmt, sizeof(__pyx_k_AlterObjectDependsStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterObjectSchemaStmt, sizeof(__pyx_k_AlterObjectSchemaStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterOpFamilyStmt, sizeof(__pyx_k_AlterOpFamilyStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterOperatorStmt, sizeof(__pyx_k_AlterOperatorStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterOwnerStmt, sizeof(__pyx_k_AlterOwnerStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterPolicyStmt, sizeof(__pyx_k_AlterPolicyStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterPublicationAction, sizeof(__pyx_k_AlterPublicationAction), 0, 1, 0, 1},
  {0, __pyx_k_AlterPublicationStmt, sizeof(__pyx_k_AlterPublicationStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterRoleSetStmt, sizeof(__pyx_k_AlterRoleSetStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterRoleStmt, sizeof(__pyx_k_AlterRoleStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterSeqStmt, sizeof(__pyx_k_AlterSeqStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterStatsStmt, sizeof(__pyx_k_AlterStatsStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterSubscriptionStmt, sizeof(__pyx_k_AlterSubscriptionStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterSubscriptionType, sizeof(__pyx_k_AlterSubscriptionType), 0, 1, 0, 1},
  {0, __pyx_k_AlterSystemStmt, sizeof(__pyx_k_AlterSystemStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterTSConfigType, sizeof(__pyx_k_AlterTSConfigType), 0, 1, 0, 1},
  {0, __pyx_k_AlterTSConfigurationStmt, sizeof(__pyx_k_AlterTSConfigurationStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterTSDictionaryStmt, sizeof(__pyx_k_AlterTSDictionaryStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterTableCmd, sizeof(__pyx_k_AlterTableCmd), 0, 0, 1, 1},
  {0, __pyx_k_AlterTableMoveAllStmt, sizeof(__pyx_k_AlterTableMoveAllStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterTableSpaceOptionsStmt, sizeof(__pyx_k_AlterTableSpaceOptionsStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterTableStmt, sizeof(__pyx_k_AlterTableStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterTableType, sizeof(__pyx_k_AlterTableType), 0, 1, 0, 1},
  {0, __pyx_k_AlterTypeStmt, sizeof(__pyx_k_AlterTypeStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlterUserMappingStmt, sizeof(__pyx_k_AlterUserMappingStmt), 0, 0, 1, 1},
  {0, __pyx_k_AlternativeSubPlan, sizeof(__pyx_k_AlternativeSubPlan), 0, 0, 1, 1},
  {0, __pyx_k_ArrayCoerceExpr, sizeof(__pyx_k_ArrayCoerceExpr), 0, 0, 1, 1},
  {0, __pyx_k_ArrayExpr, sizeof(__pyx_k_ArrayExpr), 0, 0, 1, 1},
  {0, __pyx_k_BitString, sizeof(__pyx_k_BitString), 0, 0, 1, 1},
  {0, __pyx_k_BoolExpr, sizeof(__pyx_k_BoolExpr), 0, 0, 1, 1},
  {0, __pyx_k_BoolExprType, sizeof(__pyx_k_BoolExprType), 0, 1, 0, 1},
  {0, __pyx_k_BoolTestType, sizeof(__pyx_k_BoolTestType), 0, 1, 0, 1},
  {0, __pyx_k_Boolean, sizeof(__pyx_k_Boolean), 0, 0, 1, 1},
  {0, __pyx_k_BooleanTest, sizeof(__pyx_k_BooleanTest), 0, 0, 1, 1},
  {0, __pyx_k_CTECycleClause, sizeof(__pyx_k_CTECycleClause), 0, 0, 1, 1},
  {0, __pyx_k_CTEMaterialize, sizeof(__pyx_k_CTEMaterialize), 0, 1, 0, 1},
  {0, __pyx_k_CTESearchClause, sizeof(__pyx_k_CTESearchClause), 0, 0, 1, 1},
  {0, __pyx_k_CallContext, sizeof(__pyx_k_CallContext), 0, 0, 1, 1},
  {0, __pyx_k_CallStmt, sizeof(__pyx_k_CallStmt), 0, 0, 1, 1},
  {0, __pyx_k_CaseExpr, sizeof(__pyx_k_CaseExpr), 0, 0, 1, 1},
  {0, __pyx_k_CaseTestExpr, sizeof(__pyx_k_CaseTestExpr), 0, 0, 1, 1},
  {0, __pyx_k_CaseWhen, sizeof(__pyx_k_CaseWhen), 0, 0, 1, 1},
  {0, __pyx_k_CheckPointStmt, sizeof(__pyx_k_CheckPointStmt), 0, 0, 1, 1},
  {0, __pyx_k_ClosePortalStmt, sizeof(__pyx_k_ClosePortalStmt), 0, 0, 1, 1},
  {0, __pyx_k_ClusterStmt, sizeof(__pyx_k_ClusterStmt), 0, 0, 1, 1},
  {0, __pyx_k_CmdType, sizeof(__pyx_k_CmdType), 0, 1, 0, 1},
  {0, __pyx_k_CoalesceExpr, sizeof(__pyx_k_CoalesceExpr), 0, 0, 1, 1},
  {0, __pyx_k_CoerceToDomain, sizeof(__pyx_k_CoerceToDomain), 0, 0, 1, 1},
  {0, __pyx_k_CoerceToDomainValue, sizeof(__pyx_k_CoerceToDomainValue), 0, 0, 1, 1},
  {0, __pyx_k_CoerceViaIO, sizeof(__pyx_k_CoerceViaIO), 0, 0, 1, 1},
  {0, __pyx_k_CoercionContext, sizeof(__pyx_k_CoercionContext), 0, 1, 0, 1},
  {0, __pyx_k_CoercionForm, sizeof(__pyx_k_CoercionForm), 0, 1, 0, 1},
  {0, __pyx_k_CollateClause, sizeof(__pyx_k_CollateClause), 0, 0, 1, 1},
  {0, __pyx_k_CollateExpr, sizeof(__pyx_k_CollateExpr), 0, 0, 1, 1},
  {0, __pyx_k_ColumnDef, sizeof(__pyx_k_ColumnDef), 0, 0, 1, 1},
  {0, __pyx_k_ColumnRef, sizeof(__pyx_k_ColumnRef), 0, 0, 1, 1},
  {0, __pyx_k_CommentStmt, sizeof(__pyx_k_CommentStmt), 0, 0, 1, 1},
  {0, __pyx_k_CommonTableExpr, sizeof(__pyx_k_CommonTableExpr), 0, 0, 1, 1},
  {0, __pyx_k_CompositeTypeStmt, sizeof(__pyx_k_CompositeTypeStmt), 0, 0, 1, 1},
  {0, __pyx_k_ConstrType, sizeof(__pyx_k_ConstrType), 0, 1, 0, 1},
  {0, __pyx_k_Constraint, sizeof(__pyx_k_Constraint), 0, 0, 1, 1},
  {0, __pyx_k_ConstraintsSetStmt, sizeof(__pyx_k_ConstraintsSetStmt), 0, 0, 1, 1},
  {0, __pyx_k_ConvertRowtypeExpr, sizeof(__pyx_k_ConvertRowtypeExpr), 0, 0, 1, 1},
  {0, __pyx_k_CopyStmt, sizeof(__pyx_k_CopyStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateAmStmt, sizeof(__pyx_k_CreateAmStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateCastStmt, sizeof(__pyx_k_CreateCastStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateConversionStmt, sizeof(__pyx_k_CreateConversionStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateDomainStmt, sizeof(__pyx_k_CreateDomainStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateEnumStmt, sizeof(__pyx_k_CreateEnumStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateEventTrigStmt, sizeof(__pyx_k_CreateEventTrigStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateExtensionStmt, sizeof(__pyx_k_CreateExtensionStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateFdwStmt, sizeof(__pyx_k_CreateFdwStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateForeignServerStmt, sizeof(__pyx_k_CreateForeignServerStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateForeignTableStmt, sizeof(__pyx_k_CreateForeignTableStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateFunctionStmt, sizeof(__pyx_k_CreateFunctionStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateOpClassItem, sizeof(__pyx_k_CreateOpClassItem), 0, 0, 1, 1},
  {0, __pyx_k_CreateOpClassStmt, sizeof(__pyx_k_CreateOpClassStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateOpFamilyStmt, sizeof(__pyx_k_CreateOpFamilyStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreatePLangStmt, sizeof(__pyx_k_CreatePLangStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreatePolicyStmt, sizeof(__pyx_k_CreatePolicyStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreatePublicationStmt, sizeof(__pyx_k_CreatePublicationStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateRangeStmt, sizeof(__pyx_k_CreateRangeStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateRoleStmt, sizeof(__pyx_k_CreateRoleStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateSchemaStmt, sizeof(__pyx_k_CreateSchemaStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateSeqStmt, sizeof(__pyx_k_CreateSeqStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateStatsStmt, sizeof(__pyx_k_CreateStatsStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateStmt, sizeof(__pyx_k_CreateStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateSubscriptionStmt, sizeof(__pyx_k_CreateSubscriptionStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateTableAsStmt, sizeof(__pyx_k_CreateTableAsStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateTableSpaceStmt, sizeof(__pyx_k_CreateTableSpaceStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateTransformStmt, sizeof(__pyx_k_CreateTransformStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateTrigStmt, sizeof(__pyx_k_CreateTrigStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreateUserMappingStmt, sizeof(__pyx_k_CreateUserMappingStmt), 0, 0, 1, 1},
  {0, __pyx_k_CreatedbStmt, sizeof(__pyx_k_CreatedbStmt), 0, 0, 1, 1},
  {0, __pyx_k_CurrentOfExpr, sizeof(__pyx_k_CurrentOfExpr), 0, 0, 1, 1},
  {0, __pyx_k_DeallocateStmt, sizeof(__pyx_k_DeallocateStmt), 0, 0, 1, 1},
  {0, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1},
  {0, __pyx_k_DeclareCursorStmt, sizeof(__pyx_k_DeclareCursorStmt), 0, 0, 1, 1},
  {0, __pyx_k_DefElem, sizeof(__pyx_k_DefElem), 0, 0, 1, 1},
  {0, __pyx_k_DefElemAction, sizeof(__pyx_k_DefElemAction), 0, 1, 0, 1},
  {0, __pyx_k_DefineStmt, sizeof(__pyx_k_DefineStmt), 0, 0, 1, 1},
  {0, __pyx_k_DeleteStmt, sizeof(__pyx_k_DeleteStmt), 0, 0, 1, 1},
  {0, __pyx_k_DeparseError, sizeof(__pyx_k_DeparseError), 0, 0, 1, 1},
  {0, __pyx_k_DeparseError___str, sizeof(__pyx_k_DeparseError___str), 0, 0, 1, 1},
  {0, __pyx_k_DiscardMode, sizeof(__pyx_k_DiscardMode), 0, 1, 0, 1},
  {0, __pyx_k_DiscardStmt, sizeof(__pyx_k_DiscardStmt), 0, 0, 1, 1},
  {0, __pyx_k_Displacements, sizeof(__pyx_k_Displacements), 0, 0, 1, 1},
  {0, __pyx_k_Displacements___reduce_cython, sizeof(__pyx_k_Displacements___reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_Displacements___setstate_cython, sizeof(__pyx_k_Displacements___setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_DoStmt, sizeof(__pyx_k_DoStmt), 0, 0, 1, 1},
  {0, __pyx_k_DropBehavior, sizeof(__pyx_k_DropBehavior), 0, 1, 0, 1},
  {0, __pyx_k_DropOwnedStmt, sizeof(__pyx_k_DropOwnedStmt), 0, 0, 1, 1},
  {0, __pyx_k_DropRoleStmt, sizeof(__pyx_k_DropRoleStmt), 0, 0, 1, 1},
  {0, __pyx_k_DropStmt, sizeof(__pyx_k_DropStmt), 0, 0, 1, 1},
  {0, __pyx_k_DropSubscriptionStmt, sizeof(__pyx_k_DropSubscriptionStmt), 0, 0, 1, 1},
  {0, __pyx_k_DropTableSpaceStmt, sizeof(__pyx_k_DropTableSpaceStmt), 0, 0, 1, 1},
  {0, __pyx_k_DropUserMappingStmt, sizeof(__pyx_k_DropUserMappingStmt), 0, 0, 1, 1},
  {0, __pyx_k_DropdbStmt, sizeof(__pyx_k_DropdbStmt), 0, 0, 1, 1},
  {0, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
  {0, __pyx_k_Exception_representing_the_error, sizeof(__pyx_k_Exception_representing_the_error), 0, 0, 1, 0},
  {0, __pyx_k_Exception_representing_the_error_2, sizeof(__pyx_k_Exception_representing_the_error_2), 0, 0, 1, 0},
  {0, __pyx_k_ExecuteStmt, sizeof(__pyx_k_ExecuteStmt), 0, 0, 1, 1},
  {0, __pyx_k_ExplainStmt, sizeof(__pyx_k_ExplainStmt), 0, 0, 1, 1},
  {0, __pyx_k_FetchDirection, sizeof(__pyx_k_FetchDirection), 0, 1, 0, 1},
  {0, __pyx_k_FetchStmt, sizeof(__pyx_k_FetchStmt), 0, 0, 1, 1},
  {0, __pyx_k_FieldSelect, sizeof(__pyx_k_FieldSelect), 0, 0, 1, 1},
  {0, __pyx_k_FieldStore, sizeof(__pyx_k_FieldStore), 0, 0, 1, 1},
  {0, __pyx_k_Float, sizeof(__pyx_k_Float), 0, 0, 1, 1},
  {0, __pyx_k_FromExpr, sizeof(__pyx_k_FromExpr), 0, 0, 1, 1},
  {0, __pyx_k_FuncCall, sizeof(__pyx_k_FuncCall), 0, 0, 1, 1},
  {0, __pyx_k_FuncExpr, sizeof(__pyx_k_FuncExpr), 0, 0, 1, 1},
  {0, __pyx_k_FunctionParameter, sizeof(__pyx_k_FunctionParameter), 0, 0, 1, 1},
  {0, __pyx_k_FunctionParameterMode, sizeof(__pyx_k_FunctionParameterMode), 0, 1, 0, 1},
  {0, __pyx_k_GrantRoleStmt, sizeof(__pyx_k_GrantRoleStmt), 0, 0, 1, 1},
  {0, __pyx_k_GrantStmt, sizeof(__pyx_k_GrantStmt), 0, 0, 1, 1},
  {0, __pyx_k_GrantTargetType, sizeof(__pyx_k_GrantTargetType), 0, 1, 0, 1},
  {0, __pyx_k_GroupingFunc, sizeof(__pyx_k_GroupingFunc), 0, 0, 1, 1},
  {0, __pyx_k_GroupingSet, sizeof(__pyx_k_GroupingSet), 0, 0, 1, 1},
  {0, __pyx_k_GroupingSetKind, sizeof(__pyx_k_GroupingSetKind), 0, 1, 0, 1},
  {0, __pyx_k_ImportForeignSchemaStmt, sizeof(__pyx_k_ImportForeignSchemaStmt), 0, 0, 1, 1},
  {0, __pyx_k_ImportForeignSchemaType, sizeof(__pyx_k_ImportForeignSchemaType), 0, 1, 0, 1},
  {0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {0, __pyx_k_IndexElem, sizeof(__pyx_k_IndexElem), 0, 0, 1, 1},
  {0, __pyx_k_IndexStmt, sizeof(__pyx_k_IndexStmt), 0, 0, 1, 1},
  {0, __pyx_k_InferClause, sizeof(__pyx_k_InferClause), 0, 0, 1, 1},
  {0, __pyx_k_InferenceElem, sizeof(__pyx_k_InferenceElem), 0, 0, 1, 1},
  {0, __pyx_k_InlineCodeBlock, sizeof(__pyx_k_InlineCodeBlock), 0, 0, 1, 1},
  {0, __pyx_k_InsertStmt, sizeof(__pyx_k_InsertStmt), 0, 0, 1, 1},
  {0, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 0, 1, 1},
  {0, __pyx_k_IntoClause, sizeof(__pyx_k_IntoClause), 0, 0, 1, 1},
  {0, __pyx_k_JoinExpr, sizeof(__pyx_k_JoinExpr), 0, 0, 1, 1},
  {0, __pyx_k_JoinType, sizeof(__pyx_k_JoinType), 0, 1, 0, 1},
  {0, __pyx_k_LONG_MAX, sizeof(__pyx_k_LONG_MAX), 0, 0, 1, 1},
  {0, __pyx_k_LimitOption, sizeof(__pyx_k_LimitOption), 0, 1, 0, 1},
  {0, __pyx_k_ListenStmt, sizeof(__pyx_k_ListenStmt), 0, 0, 1, 1},
  {0, __pyx_k_LoadStmt, sizeof(__pyx_k_LoadStmt), 0, 0, 1, 1},
  {0, __pyx_k_LockClauseStrength, sizeof(__pyx_k_LockClauseStrength), 0, 1, 0, 1},
  {0, __pyx_k_LockStmt, sizeof(__pyx_k_LockStmt), 0, 0, 1, 1},
  {0, __pyx_k_LockWaitPolicy, sizeof(__pyx_k_LockWaitPolicy), 0, 1, 0, 1},
  {0, __pyx_k_LockingClause, sizeof(__pyx_k_LockingClause), 0, 0, 1, 1},
  {0, __pyx_k_MergeAction, sizeof(__pyx_k_MergeAction), 0, 0, 1, 1},
  {0, __pyx_k_MergeStmt, sizeof(__pyx_k_MergeStmt), 0, 0, 1, 1},
  {0, __pyx_k_MergeWhenClause, sizeof(__pyx_k_MergeWhenClause), 0, 0, 1, 1},
  {0, __pyx_k_MinMaxExpr, sizeof(__pyx_k_MinMaxExpr), 0, 0, 1, 1},
  {0, __pyx_k_MinMaxOp, sizeof(__pyx_k_MinMaxOp), 0, 1, 0, 1},
  {0, __pyx_k_MultiAssignRef, sizeof(__pyx_k_MultiAssignRef), 0, 0, 1, 1},
  {0, __pyx_k_NamedArgExpr, sizeof(__pyx_k_NamedArgExpr), 0, 0, 1, 1},
  {0, __pyx_k_NotifyStmt, sizeof(__pyx_k_NotifyStmt), 0, 0, 1, 1},
  {0, __pyx_k_NullTest, sizeof(__pyx_k_NullTest), 0, 0, 1, 1},
  {0, __pyx_k_NullTestType, sizeof(__pyx_k_NullTestType), 0, 1, 0, 1},
  {0, __pyx_k_ObjectType, sizeof(__pyx_k_ObjectType), 0, 1, 0, 1},
  {0, __pyx_k_ObjectWithArgs, sizeof(__pyx_k_ObjectWithArgs), 0, 0, 1, 1},
  {0, __pyx_k_OnCommitAction, sizeof(__pyx_k_OnCommitAction), 0, 1, 0, 1},
  {0, __pyx_k_OnConflictAction, sizeof(__pyx_k_OnConflictAction), 0, 1, 0, 1},
  {0, __pyx_k_OnConflictClause, sizeof(__pyx_k_OnConflictClause), 0, 0, 1, 1},
  {0, __pyx_k_OnConflictExpr, sizeof(__pyx_k_OnConflictExpr), 0, 0, 1, 1},
  {0, __pyx_k_OpExpr, sizeof(__pyx_k_OpExpr), 0, 0, 1, 1},
  {0, __pyx_k_OverridingKind, sizeof(__pyx_k_OverridingKind), 0, 1, 0, 1},
  {0, __pyx_k_PLAssignStmt, sizeof(__pyx_k_PLAssignStmt), 0, 0, 1, 1},
  {0, __pyx_k_Param, sizeof(__pyx_k_Param), 0, 0, 1, 1},
  {0, __pyx_k_ParamKind, sizeof(__pyx_k_ParamKind), 0, 1, 0, 1},
  {0, __pyx_k_ParamRef, sizeof(__pyx_k_ParamRef), 0, 0, 1, 1},
  {0, __pyx_k_ParseError, sizeof(__pyx_k_ParseError), 0, 0, 1, 1},
  {0, __pyx_k_ParseError___str, sizeof(__pyx_k_ParseError___str), 0, 0, 1, 1},
  {0, __pyx_k_PartitionBoundSpec, sizeof(__pyx_k_PartitionBoundSpec), 0, 0, 1, 1},
  {0, __pyx_k_PartitionCmd, sizeof(__pyx_k_PartitionCmd), 0, 0, 1, 1},
  {0, __pyx_k_PartitionElem, sizeof(__pyx_k_PartitionElem), 0, 0, 1, 1},
  {0, __pyx_k_PartitionRangeDatum, sizeof(__pyx_k_PartitionRangeDatum), 0, 0, 1, 1},
  {0, __pyx_k_PartitionRangeDatumKind, sizeof(__pyx_k_PartitionRangeDatumKind), 0, 1, 0, 1},
  {0, __pyx_k_PartitionSpec, sizeof(__pyx_k_PartitionSpec), 0, 0, 1, 1},
  {0, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {0, __pyx_k_PrepareStmt, sizeof(__pyx_k_PrepareStmt), 0, 0, 1, 1},
  {0, __pyx_k_PublicationObjSpec, sizeof(__pyx_k_PublicationObjSpec), 0, 0, 1, 1},
  {0, __pyx_k_PublicationObjSpecType, sizeof(__pyx_k_PublicationObjSpecType), 0, 1, 0, 1},
  {0, __pyx_k_PublicationTable, sizeof(__pyx_k_PublicationTable), 0, 0, 1, 1},
  {0, __pyx_k_Query, sizeof(__pyx_k_Query), 0, 0, 1, 1},
  {0, __pyx_k_QuerySource, sizeof(__pyx_k_QuerySource), 0, 1, 0, 1},
  {0, __pyx_k_RTEKind, sizeof(__pyx_k_RTEKind), 0, 1, 0, 1},
  {0, __pyx_k_RangeFunction, sizeof(__pyx_k_RangeFunction), 0, 0, 1, 1},
  {0, __pyx_k_RangeSubselect, sizeof(__pyx_k_RangeSubselect), 0, 0, 1, 1},
  {0, __pyx_k_RangeTableFunc, sizeof(__pyx_k_RangeTableFunc), 0, 0, 1, 1},
  {0, __pyx_k_RangeTableFuncCol, sizeof(__pyx_k_RangeTableFuncCol), 0, 0, 1, 1},
  {0, __pyx_k_RangeTableSample, sizeof(__pyx_k_RangeTableSample), 0, 0, 1, 1},
  {0, __pyx_k_RangeTblEntry, sizeof(__pyx_k_RangeTblEntry), 0, 0, 1, 1},
  {0, __pyx_k_RangeTblFunction, sizeof(__pyx_k_RangeTblFunction), 0, 0, 1, 1},
  {0, __pyx_k_RangeTblRef, sizeof(__pyx_k_RangeTblRef), 0, 0, 1, 1},
  {0, __pyx_k_RangeVar, sizeof(__pyx_k_RangeVar), 0, 0, 1, 1},
  {0, __pyx_k_RawStmt, sizeof(__pyx_k_RawStmt), 0, 0, 1, 1},
  {0, __pyx_k_ReassignOwnedStmt, sizeof(__pyx_k_ReassignOwnedStmt), 0, 0, 1, 1},
  {0, __pyx_k_RefreshMatViewStmt, sizeof(__pyx_k_RefreshMatViewStmt), 0, 0, 1, 1},
  {0, __pyx_k_ReindexObjectType, sizeof(__pyx_k_ReindexObjectType), 0, 1, 0, 1},
  {0, __pyx_k_ReindexStmt, sizeof(__pyx_k_ReindexStmt), 0, 0, 1, 1},
  {0, __pyx_k_RelabelType, sizeof(__pyx_k_RelabelType), 0, 0, 1, 1},
  {0, __pyx_k_RenameStmt, sizeof(__pyx_k_RenameStmt), 0, 0, 1, 1},
  {0, __pyx_k_ReplicaIdentityStmt, sizeof(__pyx_k_ReplicaIdentityStmt), 0, 0, 1, 1},
  {0, __pyx_k_ResTarget, sizeof(__pyx_k_ResTarget), 0, 0, 1, 1},
  {0, __pyx_k_ReturnStmt, sizeof(__pyx_k_ReturnStmt), 0, 0, 1, 1},
  {0, __pyx_k_RoleSpec, sizeof(__pyx_k_RoleSpec), 0, 0, 1, 1},
  {0, __pyx_k_RoleSpecType, sizeof(__pyx_k_RoleSpecType), 0, 1, 0, 1},
  {0, __pyx_k_RoleStmtType, sizeof(__pyx_k_RoleStmtType), 0, 1, 0, 1},
  {0, __pyx_k_RowCompareExpr, sizeof(__pyx_k_RowCompareExpr), 0, 0, 1, 1},
  {0, __pyx_k_RowCompareType, sizeof(__pyx_k_RowCompareType), 0, 1, 0, 1},
  {0, __pyx_k_RowExpr, sizeof(__pyx_k_RowExpr), 0, 0, 1, 1},
  {0, __pyx_k_RowMarkClause, sizeof(__pyx_k_RowMarkClause), 0, 0, 1, 1},
  {0, __pyx_k_RuleStmt, sizeof(__pyx_k_RuleStmt), 0, 0, 1, 1},
  {0, __pyx_k_SQLValueFunction, sizeof(__pyx_k_SQLValueFunction), 0, 0, 1, 1},
  {0, __pyx_k_SQLValueFunctionOp, sizeof(__pyx_k_SQLValueFunctionOp), 0, 1, 0, 1},
  {0, __pyx_k_ScalarArrayOpExpr, sizeof(__pyx_k_ScalarArrayOpExpr), 0, 0, 1, 1},
  {0, __pyx_k_SecLabelStmt, sizeof(__pyx_k_SecLabelStmt), 0, 0, 1, 1},
  {0, __pyx_k_SelectStmt, sizeof(__pyx_k_SelectStmt), 0, 0, 1, 1},
  {0, __pyx_k_SetOperation, sizeof(__pyx_k_SetOperation), 0, 1, 0, 1},
  {0, __pyx_k_SetOperationStmt, sizeof(__pyx_k_SetOperationStmt), 0, 0, 1, 1},
  {0, __pyx_k_SetToDefault, sizeof(__pyx_k_SetToDefault), 0, 0, 1, 1},
  {0, __pyx_k_SortBy, sizeof(__pyx_k_SortBy), 0, 0, 1, 1},
  {0, __pyx_k_SortByDir, sizeof(__pyx_k_SortByDir), 0, 1, 0, 1},
  {0, __pyx_k_SortByNulls, sizeof(__pyx_k_SortByNulls), 0, 1, 0, 1},
  {0, __pyx_k_SortGroupClause, sizeof(__pyx_k_SortGroupClause), 0, 0, 1, 1},
  {0, __pyx_k_StatsElem, sizeof(__pyx_k_StatsElem), 0, 0, 1, 1},
  {0, __pyx_k_String, sizeof(__pyx_k_String), 0, 0, 1, 1},
  {0, __pyx_k_SubLink, sizeof(__pyx_k_SubLink), 0, 0, 1, 1},
  {0, __pyx_k_SubLinkType, sizeof(__pyx_k_SubLinkType), 0, 1, 0, 1},
  {0, __pyx_k_SubPlan, sizeof(__pyx_k_SubPlan), 0, 0, 1, 1},
  {0, __pyx_k_SubscriptingRef, sizeof(__pyx_k_SubscriptingRef), 0, 0, 1, 1},
  {0, __pyx_k_TableFunc, sizeof(__pyx_k_TableFunc), 0, 0, 1, 1},
  {0, __pyx_k_TableLikeClause, sizeof(__pyx_k_TableLikeClause), 0, 0, 1, 1},
  {0, __pyx_k_TableSampleClause, sizeof(__pyx_k_TableSampleClause), 0, 0, 1, 1},
  {0, __pyx_k_TargetEntry, sizeof(__pyx_k_TargetEntry), 0, 0, 1, 1},
  {0, __pyx_k_Token, sizeof(__pyx_k_Token), 0, 0, 1, 1},
  {0, __pyx_k_Token, sizeof(__pyx_k_Token), 0, 1, 0, 1},
  {0, __pyx_k_TransactionStmt, sizeof(__pyx_k_TransactionStmt), 0, 0, 1, 1},
  {0, __pyx_k_TransactionStmtKind, sizeof(__pyx_k_TransactionStmtKind), 0, 1, 0, 1},
  {0, __pyx_k_TriggerTransition, sizeof(__pyx_k_TriggerTransition), 0, 0, 1, 1},
  {0, __pyx_k_TruncateStmt, sizeof(__pyx_k_TruncateStmt), 0, 0, 1, 1},
  {0, __pyx_k_TypeCast, sizeof(__pyx_k_TypeCast), 0, 0, 1, 1},
  {0, __pyx_k_TypeName, sizeof(__pyx_k_TypeName), 0, 0, 1, 1},
  {0, __pyx_k_UNKNOWN, sizeof(__pyx_k_UNKNOWN), 0, 1, 0, 1},
  {0, __pyx_k_Unhandled_tag_s, sizeof(__pyx_k_Unhandled_tag_s), 0, 1, 0, 0},
  {0, __pyx_k_UnlistenStmt, sizeof(__pyx_k_UnlistenStmt), 0, 0, 1, 1},
  {0, __pyx_k_UpdateStmt, sizeof(__pyx_k_UpdateStmt), 0, 0, 1, 1},
  {0, __pyx_k_VacuumRelation, sizeof(__pyx_k_VacuumRelation), 0, 0, 1, 1},
  {0, __pyx_k_VacuumStmt, sizeof(__pyx_k_VacuumStmt), 0, 0, 1, 1},
  {0, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {0, __pyx_k_Var, sizeof(__pyx_k_Var), 0, 0, 1, 1},
  {0, __pyx_k_VariableSetKind, sizeof(__pyx_k_VariableSetKind), 0, 1, 0, 1},
  {0, __pyx_k_VariableSetStmt, sizeof(__pyx_k_VariableSetStmt), 0, 0, 1, 1},
  {0, __pyx_k_VariableShowStmt, sizeof(__pyx_k_VariableShowStmt), 0, 0, 1, 1},
  {0, __pyx_k_ViewCheckOption, sizeof(__pyx_k_ViewCheckOption), 0, 1, 0, 1},
  {0, __pyx_k_ViewStmt, sizeof(__pyx_k_ViewStmt), 0, 0, 1, 1},
  {0, __pyx_k_WCOKind, sizeof(__pyx_k_WCOKind), 0, 1, 0, 1},
  {0, __pyx_k_WindowClause, sizeof(__pyx_k_WindowClause), 0, 0, 1, 1},
  {0, __pyx_k_WindowDef, sizeof(__pyx_k_WindowDef), 0, 0, 1, 1},
  {0, __pyx_k_WindowFunc, sizeof(__pyx_k_WindowFunc), 0, 0, 1, 1},
  {0, __pyx_k_WithCheckOption, sizeof(__pyx_k_WithCheckOption), 0, 0, 1, 1},
  {0, __pyx_k_WithClause, sizeof(__pyx_k_WithClause), 0, 0, 1, 1},
  {0, __pyx_k_XmlExpr, sizeof(__pyx_k_XmlExpr), 0, 0, 1, 1},
  {0, __pyx_k_XmlExprOp, sizeof(__pyx_k_XmlExprOp), 0, 1, 0, 1},
  {0, __pyx_k_XmlOptionType, sizeof(__pyx_k_XmlOptionType), 0, 1, 0, 1},
  {0, __pyx_k_XmlSerialize, sizeof(__pyx_k_XmlSerialize), 0, 0, 1, 1},
  {0, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
  {0, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1},
  {0, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {0, __pyx_k_ast, sizeof(__pyx_k_ast), 0, 0, 1, 1},
  {0, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  {0, __pyx_k_at_index, sizeof(__pyx_k_at_index), 0, 1, 0, 0},
  {0, __pyx_k_at_position, sizeof(__pyx_k_at_position), 0, 1, 0, 0},
  {0, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
  {0, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {0, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {0, __pyx_k_cstring, sizeof(__pyx_k_cstring), 0, 0, 1, 1},
  {0, __pyx_k_cur_offset, sizeof(__pyx_k_cur_offset), 0, 0, 1, 1},
  {0, __pyx_k_cursorpos, sizeof(__pyx_k_cursorpos), 0, 0, 1, 1},
  {0, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {0, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {0, __pyx_k_deparse_protobuf, sizeof(__pyx_k_deparse_protobuf), 0, 0, 1, 1},
  {0, __pyx_k_deparsed, sizeof(__pyx_k_deparsed), 0, 0, 1, 1},
  {0, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {0, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {0, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
  {0, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {0, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
  {0, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {0, __pyx_k_end, sizeof(__pyx_k_end), 0, 1, 0, 1},
  {0, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {0, __pyx_k_enums, sizeof(__pyx_k_enums), 0, 0, 1, 1},
  {0, __pyx_k_fingerprint, sizeof(__pyx_k_fingerprint), 0, 0, 1, 1},
  {0, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
  {0, __pyx_k_get_postgresql_version, sizeof(__pyx_k_get_postgresql_version), 0, 0, 1, 1},
  {0, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {0, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {0, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {0, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {0, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
  {0, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
  {0, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
  {0, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {0, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 1, 0, 1},
  {0, __pyx_k_kwkind, sizeof(__pyx_k_kwkind), 0, 0, 1, 1},
  {0, __pyx_k_location, sizeof(__pyx_k_location), 0, 0, 1, 1},
  {0, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {0, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
  {0, __pyx_k_mctx, sizeof(__pyx_k_mctx), 0, 0, 1, 1},
  {0, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {0, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {0, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1},
  {0, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {0, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
  {0, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {0, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 0, 1},
  {0, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {0, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {0, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
  {0, __pyx_k_offset_to_index, sizeof(__pyx_k_offset_to_index), 0, 0, 1, 1},
  {0, __pyx_k_only_slices, sizeof(__pyx_k_only_slices), 0, 0, 1, 1},
  {0, __pyx_k_parse_plpgsql_json, sizeof(__pyx_k_parse_plpgsql_json), 0, 0, 1, 1},
  {0, __pyx_k_parse_sql, sizeof(__pyx_k_parse_sql), 0, 0, 1, 1},
  {0, __pyx_k_parse_sql_json, sizeof(__pyx_k_parse_sql_json), 0, 0, 1, 1},
  {0, __pyx_k_parse_sql_protobuf, sizeof(__pyx_k_parse_sql_protobuf), 0, 0, 1, 1},
  {0, __pyx_k_parsed, sizeof(__pyx_k_parsed), 0, 0, 1, 1},
  {0, __pyx_k_pglast, sizeof(__pyx_k_pglast), 0, 0, 1, 1},
  {0, __pyx_k_pglast_parser, sizeof(__pyx_k_pglast_parser), 0, 0, 1, 1},
  {0, __pyx_k_pglast_parser_pyx, sizeof(__pyx_k_pglast_parser_pyx), 0, 0, 1, 0},
  {0, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {0, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {0, __pyx_k_prev_offset, sizeof(__pyx_k_prev_offset), 0, 0, 1, 1},
  {0, __pyx_k_protobuf, sizeof(__pyx_k_protobuf), 0, 0, 1, 1},
  {0, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {0, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {0, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {0, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {0, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {0, __pyx_k_pyx_unpickle_Displacements, sizeof(__pyx_k_pyx_unpickle_Displacements), 0, 0, 1, 1},
  {0, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {0, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1},
  {0, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {0, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {0, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {0, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {0, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {0, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
  {0, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {0, __pyx_k_scan, sizeof(__pyx_k_scan), 0, 0, 1, 1},
  {0, __pyx_k_scan_result, sizeof(__pyx_k_scan_result), 0, 0, 1, 1},
  {0, __pyx_k_scan_token, sizeof(__pyx_k_scan_token), 0, 0, 1, 1},
  {0, __pyx_k_scanned, sizeof(__pyx_k_scanned), 0, 0, 1, 1},
  {0, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {0, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
  {0, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {0, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {0, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {0, __pyx_k_splitted, sizeof(__pyx_k_splitted), 0, 0, 1, 1},
  {0, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {0, __pyx_k_start, sizeof(__pyx_k_start), 0, 1, 0, 1},
  {0, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {0, __pyx_k_stmt, sizeof(__pyx_k_stmt), 0, 0, 1, 1},
  {0, __pyx_k_stmts, sizeof(__pyx_k_stmts), 0, 0, 1, 1},
  {0, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {0, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {0, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {0, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {0, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {0, __pyx_k_tkind, sizeof(__pyx_k_tkind), 0, 0, 1, 1},
  {0, __pyx_k_token, sizeof(__pyx_k_token), 0, 0, 1, 1},
  {0, __pyx_k_tree, sizeof(__pyx_k_tree), 0, 0, 1, 1},
  {0, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {0, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {0, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {0, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1},
  {0, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {0, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {0, __pyx_k_with_parser, sizeof(__pyx_k_with_parser), 0, 0, 1, 1},
  #else
  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 1, 0, 0},
  {&__pyx_n_s_A_ArrayExpr, __pyx_k_A_ArrayExpr, sizeof(__pyx_k_A_ArrayExpr), 0, 0, 1, 1},
  {&__pyx_n_s_A_Const, __pyx_k_A_Const, sizeof(__pyx_k_A_Const), 0, 0, 1, 1},
  {&__pyx_n_s_A_Expr, __pyx_k_A_Expr, sizeof(__pyx_k_A_Expr), 0, 0, 1, 1},
  {&__pyx_n_u_A_Expr_Kind, __pyx_k_A_Expr_Kind, sizeof(__pyx_k_A_Expr_Kind), 0, 1, 0, 1},
  {&__pyx_n_s_A_Indices, __pyx_k_A_Indices, sizeof(__pyx_k_A_Indices), 0, 0, 1, 1},
  {&__pyx_n_s_A_Indirection, __pyx_k_A_Indirection, sizeof(__pyx_k_A_Indirection), 0, 0, 1, 1},
  {&__pyx_n_s_A_Star, __pyx_k_A_Star, sizeof(__pyx_k_A_Star), 0, 0, 1, 1},
  {&__pyx_n_s_AccessPriv, __pyx_k_AccessPriv, sizeof(__pyx_k_AccessPriv), 0, 0, 1, 1},
  {&__pyx_n_u_AggSplit, __pyx_k_AggSplit, sizeof(__pyx_k_AggSplit), 0, 1, 0, 1},
  {&__pyx_n_s_Aggref, __pyx_k_Aggref, sizeof(__pyx_k_Aggref), 0, 0, 1, 1},
  {&__pyx_n_s_Alias, __pyx_k_Alias, sizeof(__pyx_k_Alias), 0, 0, 1, 1},
  {&__pyx_n_s_AlterCollationStmt, __pyx_k_AlterCollationStmt, sizeof(__pyx_k_AlterCollationStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterDatabaseRefreshCollStmt, __pyx_k_AlterDatabaseRefreshCollStmt, sizeof(__pyx_k_AlterDatabaseRefreshCollStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterDatabaseSetStmt, __pyx_k_AlterDatabaseSetStmt, sizeof(__pyx_k_AlterDatabaseSetStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterDatabaseStmt, __pyx_k_AlterDatabaseStmt, sizeof(__pyx_k_AlterDatabaseStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterDefaultPrivilegesStmt, __pyx_k_AlterDefaultPrivilegesStmt, sizeof(__pyx_k_AlterDefaultPrivilegesStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterDomainStmt, __pyx_k_AlterDomainStmt, sizeof(__pyx_k_AlterDomainStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterEnumStmt, __pyx_k_AlterEnumStmt, sizeof(__pyx_k_AlterEnumStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterEventTrigStmt, __pyx_k_AlterEventTrigStmt, sizeof(__pyx_k_AlterEventTrigStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterExtensionContentsStmt, __pyx_k_AlterExtensionContentsStmt, sizeof(__pyx_k_AlterExtensionContentsStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterExtensionStmt, __pyx_k_AlterExtensionStmt, sizeof(__pyx_k_AlterExtensionStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterFdwStmt, __pyx_k_AlterFdwStmt, sizeof(__pyx_k_AlterFdwStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterForeignServerStmt, __pyx_k_AlterForeignServerStmt, sizeof(__pyx_k_AlterForeignServerStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterFunctionStmt, __pyx_k_AlterFunctionStmt, sizeof(__pyx_k_AlterFunctionStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterObjectDependsStmt, __pyx_k_AlterObjectDependsStmt, sizeof(__pyx_k_AlterObjectDependsStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterObjectSchemaStmt, __pyx_k_AlterObjectSchemaStmt, sizeof(__pyx_k_AlterObjectSchemaStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterOpFamilyStmt, __pyx_k_AlterOpFamilyStmt, sizeof(__pyx_k_AlterOpFamilyStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterOperatorStmt, __pyx_k_AlterOperatorStmt, sizeof(__pyx_k_AlterOperatorStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterOwnerStmt, __pyx_k_AlterOwnerStmt, sizeof(__pyx_k_AlterOwnerStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterPolicyStmt, __pyx_k_AlterPolicyStmt, sizeof(__pyx_k_AlterPolicyStmt), 0, 0, 1, 1},
  {&__pyx_n_u_AlterPublicationAction, __pyx_k_AlterPublicationAction, sizeof(__pyx_k_AlterPublicationAction), 0, 1, 0, 1},
  {&__pyx_n_s_AlterPublicationStmt, __pyx_k_AlterPublicationStmt, sizeof(__pyx_k_AlterPublicationStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterRoleSetStmt, __pyx_k_AlterRoleSetStmt, sizeof(__pyx_k_AlterRoleSetStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterRoleStmt, __pyx_k_AlterRoleStmt, sizeof(__pyx_k_AlterRoleStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterSeqStmt, __pyx_k_AlterSeqStmt, sizeof(__pyx_k_AlterSeqStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterStatsStmt, __pyx_k_AlterStatsStmt, sizeof(__pyx_k_AlterStatsStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterSubscriptionStmt, __pyx_k_AlterSubscriptionStmt, sizeof(__pyx_k_AlterSubscriptionStmt), 0, 0, 1, 1},
  {&__pyx_n_u_AlterSubscriptionType, __pyx_k_AlterSubscriptionType, sizeof(__pyx_k_AlterSubscriptionType), 0, 1, 0, 1},
  {&__pyx_n_s_AlterSystemStmt, __pyx_k_AlterSystemStmt, sizeof(__pyx_k_AlterSystemStmt), 0, 0, 1, 1},
  {&__pyx_n_u_AlterTSConfigType, __pyx_k_AlterTSConfigType, sizeof(__pyx_k_AlterTSConfigType), 0, 1, 0, 1},
  {&__pyx_n_s_AlterTSConfigurationStmt, __pyx_k_AlterTSConfigurationStmt, sizeof(__pyx_k_AlterTSConfigurationStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterTSDictionaryStmt, __pyx_k_AlterTSDictionaryStmt, sizeof(__pyx_k_AlterTSDictionaryStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterTableCmd, __pyx_k_AlterTableCmd, sizeof(__pyx_k_AlterTableCmd), 0, 0, 1, 1},
  {&__pyx_n_s_AlterTableMoveAllStmt, __pyx_k_AlterTableMoveAllStmt, sizeof(__pyx_k_AlterTableMoveAllStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterTableSpaceOptionsStmt, __pyx_k_AlterTableSpaceOptionsStmt, sizeof(__pyx_k_AlterTableSpaceOptionsStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterTableStmt, __pyx_k_AlterTableStmt, sizeof(__pyx_k_AlterTableStmt), 0, 0, 1, 1},
  {&__pyx_n_u_AlterTableType, __pyx_k_AlterTableType, sizeof(__pyx_k_AlterTableType), 0, 1, 0, 1},
  {&__pyx_n_s_AlterTypeStmt, __pyx_k_AlterTypeStmt, sizeof(__pyx_k_AlterTypeStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlterUserMappingStmt, __pyx_k_AlterUserMappingStmt, sizeof(__pyx_k_AlterUserMappingStmt), 0, 0, 1, 1},
  {&__pyx_n_s_AlternativeSubPlan, __pyx_k_AlternativeSubPlan, sizeof(__pyx_k_AlternativeSubPlan), 0, 0, 1, 1},
  {&__pyx_n_s_ArrayCoerceExpr, __pyx_k_ArrayCoerceExpr, sizeof(__pyx_k_ArrayCoerceExpr), 0, 0, 1, 1},
  {&__pyx_n_s_ArrayExpr, __pyx_k_ArrayExpr, sizeof(__pyx_k_ArrayExpr), 0, 0, 1, 1},
  {&__pyx_n_s_BitString, __pyx_k_BitString, sizeof(__pyx_k_BitString), 0, 0, 1, 1},
  {&__pyx_n_s_BoolExpr, __pyx_k_BoolExpr, sizeof(__pyx_k_BoolExpr), 0, 0, 1, 1},
  {&__pyx_n_u_BoolExprType, __pyx_k_BoolExprType, sizeof(__pyx_k_BoolExprType), 0, 1, 0, 1},
  {&__pyx_n_u_BoolTestType, __pyx_k_BoolTestType, sizeof(__pyx_k_BoolTestType), 0, 1, 0, 1},
  {&__pyx_n_s_Boolean, __pyx_k_Boolean, sizeof(__pyx_k_Boolean), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanTest, __pyx_k_BooleanTest, sizeof(__pyx_k_BooleanTest), 0, 0, 1, 1},
  {&__pyx_n_s_CTECycleClause, __pyx_k_CTECycleClause, sizeof(__pyx_k_CTECycleClause), 0, 0, 1, 1},
  {&__pyx_n_u_CTEMaterialize, __pyx_k_CTEMaterialize, sizeof(__pyx_k_CTEMaterialize), 0, 1, 0, 1},
  {&__pyx_n_s_CTESearchClause, __pyx_k_CTESearchClause, sizeof(__pyx_k_CTESearchClause), 0, 0, 1, 1},
  {&__pyx_n_s_CallContext, __pyx_k_CallContext, sizeof(__pyx_k_CallContext), 0, 0, 1, 1},
  {&__pyx_n_s_CallStmt, __pyx_k_CallStmt, sizeof(__pyx_k_CallStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CaseExpr, __pyx_k_CaseExpr, sizeof(__pyx_k_CaseExpr), 0, 0, 1, 1},
  {&__pyx_n_s_CaseTestExpr, __pyx_k_CaseTestExpr, sizeof(__pyx_k_CaseTestExpr), 0, 0, 1, 1},
  {&__pyx_n_s_CaseWhen, __pyx_k_CaseWhen, sizeof(__pyx_k_CaseWhen), 0, 0, 1, 1},
  {&__pyx_n_s_CheckPointStmt, __pyx_k_CheckPointStmt, sizeof(__pyx_k_CheckPointStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ClosePortalStmt, __pyx_k_ClosePortalStmt, sizeof(__pyx_k_ClosePortalStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ClusterStmt, __pyx_k_ClusterStmt, sizeof(__pyx_k_ClusterStmt), 0, 0, 1, 1},
  {&__pyx_n_u_CmdType, __pyx_k_CmdType, sizeof(__pyx_k_CmdType), 0, 1, 0, 1},
  {&__pyx_n_s_CoalesceExpr, __pyx_k_CoalesceExpr, sizeof(__pyx_k_CoalesceExpr), 0, 0, 1, 1},
  {&__pyx_n_s_CoerceToDomain, __pyx_k_CoerceToDomain, sizeof(__pyx_k_CoerceToDomain), 0, 0, 1, 1},
  {&__pyx_n_s_CoerceToDomainValue, __pyx_k_CoerceToDomainValue, sizeof(__pyx_k_CoerceToDomainValue), 0, 0, 1, 1},
  {&__pyx_n_s_CoerceViaIO, __pyx_k_CoerceViaIO, sizeof(__pyx_k_CoerceViaIO), 0, 0, 1, 1},
  {&__pyx_n_u_CoercionContext, __pyx_k_CoercionContext, sizeof(__pyx_k_CoercionContext), 0, 1, 0, 1},
  {&__pyx_n_u_CoercionForm, __pyx_k_CoercionForm, sizeof(__pyx_k_CoercionForm), 0, 1, 0, 1},
  {&__pyx_n_s_CollateClause, __pyx_k_CollateClause, sizeof(__pyx_k_CollateClause), 0, 0, 1, 1},
  {&__pyx_n_s_CollateExpr, __pyx_k_CollateExpr, sizeof(__pyx_k_CollateExpr), 0, 0, 1, 1},
  {&__pyx_n_s_ColumnDef, __pyx_k_ColumnDef, sizeof(__pyx_k_ColumnDef), 0, 0, 1, 1},
  {&__pyx_n_s_ColumnRef, __pyx_k_ColumnRef, sizeof(__pyx_k_ColumnRef), 0, 0, 1, 1},
  {&__pyx_n_s_CommentStmt, __pyx_k_CommentStmt, sizeof(__pyx_k_CommentStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CommonTableExpr, __pyx_k_CommonTableExpr, sizeof(__pyx_k_CommonTableExpr), 0, 0, 1, 1},
  {&__pyx_n_s_CompositeTypeStmt, __pyx_k_CompositeTypeStmt, sizeof(__pyx_k_CompositeTypeStmt), 0, 0, 1, 1},
  {&__pyx_n_u_ConstrType, __pyx_k_ConstrType, sizeof(__pyx_k_ConstrType), 0, 1, 0, 1},
  {&__pyx_n_s_Constraint, __pyx_k_Constraint, sizeof(__pyx_k_Constraint), 0, 0, 1, 1},
  {&__pyx_n_s_ConstraintsSetStmt, __pyx_k_ConstraintsSetStmt, sizeof(__pyx_k_ConstraintsSetStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ConvertRowtypeExpr, __pyx_k_ConvertRowtypeExpr, sizeof(__pyx_k_ConvertRowtypeExpr), 0, 0, 1, 1},
  {&__pyx_n_s_CopyStmt, __pyx_k_CopyStmt, sizeof(__pyx_k_CopyStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateAmStmt, __pyx_k_CreateAmStmt, sizeof(__pyx_k_CreateAmStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateCastStmt, __pyx_k_CreateCastStmt, sizeof(__pyx_k_CreateCastStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateConversionStmt, __pyx_k_CreateConversionStmt, sizeof(__pyx_k_CreateConversionStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateDomainStmt, __pyx_k_CreateDomainStmt, sizeof(__pyx_k_CreateDomainStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateEnumStmt, __pyx_k_CreateEnumStmt, sizeof(__pyx_k_CreateEnumStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateEventTrigStmt, __pyx_k_CreateEventTrigStmt, sizeof(__pyx_k_CreateEventTrigStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateExtensionStmt, __pyx_k_CreateExtensionStmt, sizeof(__pyx_k_CreateExtensionStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateFdwStmt, __pyx_k_CreateFdwStmt, sizeof(__pyx_k_CreateFdwStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateForeignServerStmt, __pyx_k_CreateForeignServerStmt, sizeof(__pyx_k_CreateForeignServerStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateForeignTableStmt, __pyx_k_CreateForeignTableStmt, sizeof(__pyx_k_CreateForeignTableStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateFunctionStmt, __pyx_k_CreateFunctionStmt, sizeof(__pyx_k_CreateFunctionStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateOpClassItem, __pyx_k_CreateOpClassItem, sizeof(__pyx_k_CreateOpClassItem), 0, 0, 1, 1},
  {&__pyx_n_s_CreateOpClassStmt, __pyx_k_CreateOpClassStmt, sizeof(__pyx_k_CreateOpClassStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateOpFamilyStmt, __pyx_k_CreateOpFamilyStmt, sizeof(__pyx_k_CreateOpFamilyStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreatePLangStmt, __pyx_k_CreatePLangStmt, sizeof(__pyx_k_CreatePLangStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreatePolicyStmt, __pyx_k_CreatePolicyStmt, sizeof(__pyx_k_CreatePolicyStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreatePublicationStmt, __pyx_k_CreatePublicationStmt, sizeof(__pyx_k_CreatePublicationStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateRangeStmt, __pyx_k_CreateRangeStmt, sizeof(__pyx_k_CreateRangeStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateRoleStmt, __pyx_k_CreateRoleStmt, sizeof(__pyx_k_CreateRoleStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateSchemaStmt, __pyx_k_CreateSchemaStmt, sizeof(__pyx_k_CreateSchemaStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateSeqStmt, __pyx_k_CreateSeqStmt, sizeof(__pyx_k_CreateSeqStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateStatsStmt, __pyx_k_CreateStatsStmt, sizeof(__pyx_k_CreateStatsStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateStmt, __pyx_k_CreateStmt, sizeof(__pyx_k_CreateStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateSubscriptionStmt, __pyx_k_CreateSubscriptionStmt, sizeof(__pyx_k_CreateSubscriptionStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateTableAsStmt, __pyx_k_CreateTableAsStmt, sizeof(__pyx_k_CreateTableAsStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateTableSpaceStmt, __pyx_k_CreateTableSpaceStmt, sizeof(__pyx_k_CreateTableSpaceStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateTransformStmt, __pyx_k_CreateTransformStmt, sizeof(__pyx_k_CreateTransformStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateTrigStmt, __pyx_k_CreateTrigStmt, sizeof(__pyx_k_CreateTrigStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreateUserMappingStmt, __pyx_k_CreateUserMappingStmt, sizeof(__pyx_k_CreateUserMappingStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CreatedbStmt, __pyx_k_CreatedbStmt, sizeof(__pyx_k_CreatedbStmt), 0, 0, 1, 1},
  {&__pyx_n_s_CurrentOfExpr, __pyx_k_CurrentOfExpr, sizeof(__pyx_k_CurrentOfExpr), 0, 0, 1, 1},
  {&__pyx_n_s_DeallocateStmt, __pyx_k_DeallocateStmt, sizeof(__pyx_k_DeallocateStmt), 0, 0, 1, 1},
  {&__pyx_n_s_Decimal, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1},
  {&__pyx_n_s_DeclareCursorStmt, __pyx_k_DeclareCursorStmt, sizeof(__pyx_k_DeclareCursorStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DefElem, __pyx_k_DefElem, sizeof(__pyx_k_DefElem), 0, 0, 1, 1},
  {&__pyx_n_u_DefElemAction, __pyx_k_DefElemAction, sizeof(__pyx_k_DefElemAction), 0, 1, 0, 1},
  {&__pyx_n_s_DefineStmt, __pyx_k_DefineStmt, sizeof(__pyx_k_DefineStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DeleteStmt, __pyx_k_DeleteStmt, sizeof(__pyx_k_DeleteStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DeparseError, __pyx_k_DeparseError, sizeof(__pyx_k_DeparseError), 0, 0, 1, 1},
  {&__pyx_n_s_DeparseError___str, __pyx_k_DeparseError___str, sizeof(__pyx_k_DeparseError___str), 0, 0, 1, 1},
  {&__pyx_n_u_DiscardMode, __pyx_k_DiscardMode, sizeof(__pyx_k_DiscardMode), 0, 1, 0, 1},
  {&__pyx_n_s_DiscardStmt, __pyx_k_DiscardStmt, sizeof(__pyx_k_DiscardStmt), 0, 0, 1, 1},
  {&__pyx_n_s_Displacements, __pyx_k_Displacements, sizeof(__pyx_k_Displacements), 0, 0, 1, 1},
  {&__pyx_n_s_Displacements___reduce_cython, __pyx_k_Displacements___reduce_cython, sizeof(__pyx_k_Displacements___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_Displacements___setstate_cython, __pyx_k_Displacements___setstate_cython, sizeof(__pyx_k_Displacements___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DoStmt, __pyx_k_DoStmt, sizeof(__pyx_k_DoStmt), 0, 0, 1, 1},
  {&__pyx_n_u_DropBehavior, __pyx_k_DropBehavior, sizeof(__pyx_k_DropBehavior), 0, 1, 0, 1},
  {&__pyx_n_s_DropOwnedStmt, __pyx_k_DropOwnedStmt, sizeof(__pyx_k_DropOwnedStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DropRoleStmt, __pyx_k_DropRoleStmt, sizeof(__pyx_k_DropRoleStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DropStmt, __pyx_k_DropStmt, sizeof(__pyx_k_DropStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DropSubscriptionStmt, __pyx_k_DropSubscriptionStmt, sizeof(__pyx_k_DropSubscriptionStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DropTableSpaceStmt, __pyx_k_DropTableSpaceStmt, sizeof(__pyx_k_DropTableSpaceStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DropUserMappingStmt, __pyx_k_DropUserMappingStmt, sizeof(__pyx_k_DropUserMappingStmt), 0, 0, 1, 1},
  {&__pyx_n_s_DropdbStmt, __pyx_k_DropdbStmt, sizeof(__pyx_k_DropdbStmt), 0, 0, 1, 1},
  {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
  {&__pyx_kp_s_Exception_representing_the_error, __pyx_k_Exception_representing_the_error, sizeof(__pyx_k_Exception_representing_the_error), 0, 0, 1, 0},
  {&__pyx_kp_s_Exception_representing_the_error_2, __pyx_k_Exception_representing_the_error_2, sizeof(__pyx_k_Exception_representing_the_error_2), 0, 0, 1, 0},
  {&__pyx_n_s_ExecuteStmt, __pyx_k_ExecuteStmt, sizeof(__pyx_k_ExecuteStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ExplainStmt, __pyx_k_ExplainStmt, sizeof(__pyx_k_ExplainStmt), 0, 0, 1, 1},
  {&__pyx_n_u_FetchDirection, __pyx_k_FetchDirection, sizeof(__pyx_k_FetchDirection), 0, 1, 0, 1},
  {&__pyx_n_s_FetchStmt, __pyx_k_FetchStmt, sizeof(__pyx_k_FetchStmt), 0, 0, 1, 1},
  {&__pyx_n_s_FieldSelect, __pyx_k_FieldSelect, sizeof(__pyx_k_FieldSelect), 0, 0, 1, 1},
  {&__pyx_n_s_FieldStore, __pyx_k_FieldStore, sizeof(__pyx_k_FieldStore), 0, 0, 1, 1},
  {&__pyx_n_s_Float, __pyx_k_Float, sizeof(__pyx_k_Float), 0, 0, 1, 1},
  {&__pyx_n_s_FromExpr, __pyx_k_FromExpr, sizeof(__pyx_k_FromExpr), 0, 0, 1, 1},
  {&__pyx_n_s_FuncCall, __pyx_k_FuncCall, sizeof(__pyx_k_FuncCall), 0, 0, 1, 1},
  {&__pyx_n_s_FuncExpr, __pyx_k_FuncExpr, sizeof(__pyx_k_FuncExpr), 0, 0, 1, 1},
  {&__pyx_n_s_FunctionParameter, __pyx_k_FunctionParameter, sizeof(__pyx_k_FunctionParameter), 0, 0, 1, 1},
  {&__pyx_n_u_FunctionParameterMode, __pyx_k_FunctionParameterMode, sizeof(__pyx_k_FunctionParameterMode), 0, 1, 0, 1},
  {&__pyx_n_s_GrantRoleStmt, __pyx_k_GrantRoleStmt, sizeof(__pyx_k_GrantRoleStmt), 0, 0, 1, 1},
  {&__pyx_n_s_GrantStmt, __pyx_k_GrantStmt, sizeof(__pyx_k_GrantStmt), 0, 0, 1, 1},
  {&__pyx_n_u_GrantTargetType, __pyx_k_GrantTargetType, sizeof(__pyx_k_GrantTargetType), 0, 1, 0, 1},
  {&__pyx_n_s_GroupingFunc, __pyx_k_GroupingFunc, sizeof(__pyx_k_GroupingFunc), 0, 0, 1, 1},
  {&__pyx_n_s_GroupingSet, __pyx_k_GroupingSet, sizeof(__pyx_k_GroupingSet), 0, 0, 1, 1},
  {&__pyx_n_u_GroupingSetKind, __pyx_k_GroupingSetKind, sizeof(__pyx_k_GroupingSetKind), 0, 1, 0, 1},
  {&__pyx_n_s_ImportForeignSchemaStmt, __pyx_k_ImportForeignSchemaStmt, sizeof(__pyx_k_ImportForeignSchemaStmt), 0, 0, 1, 1},
  {&__pyx_n_u_ImportForeignSchemaType, __pyx_k_ImportForeignSchemaType, sizeof(__pyx_k_ImportForeignSchemaType), 0, 1, 0, 1},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {&__pyx_n_s_IndexElem, __pyx_k_IndexElem, sizeof(__pyx_k_IndexElem), 0, 0, 1, 1},
  {&__pyx_n_s_IndexStmt, __pyx_k_IndexStmt, sizeof(__pyx_k_IndexStmt), 0, 0, 1, 1},
  {&__pyx_n_s_InferClause, __pyx_k_InferClause, sizeof(__pyx_k_InferClause), 0, 0, 1, 1},
  {&__pyx_n_s_InferenceElem, __pyx_k_InferenceElem, sizeof(__pyx_k_InferenceElem), 0, 0, 1, 1},
  {&__pyx_n_s_InlineCodeBlock, __pyx_k_InlineCodeBlock, sizeof(__pyx_k_InlineCodeBlock), 0, 0, 1, 1},
  {&__pyx_n_s_InsertStmt, __pyx_k_InsertStmt, sizeof(__pyx_k_InsertStmt), 0, 0, 1, 1},
  {&__pyx_n_s_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 0, 1, 1},
  {&__pyx_n_s_IntoClause, __pyx_k_IntoClause, sizeof(__pyx_k_IntoClause), 0, 0, 1, 1},
  {&__pyx_n_s_JoinExpr, __pyx_k_JoinExpr, sizeof(__pyx_k_JoinExpr), 0, 0, 1, 1},
  {&__pyx_n_u_JoinType, __pyx_k_JoinType, sizeof(__pyx_k_JoinType), 0, 1, 0, 1},
  {&__pyx_n_s_LONG_MAX, __pyx_k_LONG_MAX, sizeof(__pyx_k_LONG_MAX), 0, 0, 1, 1},
  {&__pyx_n_u_LimitOption, __pyx_k_LimitOption, sizeof(__pyx_k_LimitOption), 0, 1, 0, 1},
  {&__pyx_n_s_ListenStmt, __pyx_k_ListenStmt, sizeof(__pyx_k_ListenStmt), 0, 0, 1, 1},
  {&__pyx_n_s_LoadStmt, __pyx_k_LoadStmt, sizeof(__pyx_k_LoadStmt), 0, 0, 1, 1},
  {&__pyx_n_u_LockClauseStrength, __pyx_k_LockClauseStrength, sizeof(__pyx_k_LockClauseStrength), 0, 1, 0, 1},
  {&__pyx_n_s_LockStmt, __pyx_k_LockStmt, sizeof(__pyx_k_LockStmt), 0, 0, 1, 1},
  {&__pyx_n_u_LockWaitPolicy, __pyx_k_LockWaitPolicy, sizeof(__pyx_k_LockWaitPolicy), 0, 1, 0, 1},
  {&__pyx_n_s_LockingClause, __pyx_k_LockingClause, sizeof(__pyx_k_LockingClause), 0, 0, 1, 1},
  {&__pyx_n_s_MergeAction, __pyx_k_MergeAction, sizeof(__pyx_k_MergeAction), 0, 0, 1, 1},
  {&__pyx_n_s_MergeStmt, __pyx_k_MergeStmt, sizeof(__pyx_k_MergeStmt), 0, 0, 1, 1},
  {&__pyx_n_s_MergeWhenClause, __pyx_k_MergeWhenClause, sizeof(__pyx_k_MergeWhenClause), 0, 0, 1, 1},
  {&__pyx_n_s_MinMaxExpr, __pyx_k_MinMaxExpr, sizeof(__pyx_k_MinMaxExpr), 0, 0, 1, 1},
  {&__pyx_n_u_MinMaxOp, __pyx_k_MinMaxOp, sizeof(__pyx_k_MinMaxOp), 0, 1, 0, 1},
  {&__pyx_n_s_MultiAssignRef, __pyx_k_MultiAssignRef, sizeof(__pyx_k_MultiAssignRef), 0, 0, 1, 1},
  {&__pyx_n_s_NamedArgExpr, __pyx_k_NamedArgExpr, sizeof(__pyx_k_NamedArgExpr), 0, 0, 1, 1},
  {&__pyx_n_s_NotifyStmt, __pyx_k_NotifyStmt, sizeof(__pyx_k_NotifyStmt), 0, 0, 1, 1},
  {&__pyx_n_s_NullTest, __pyx_k_NullTest, sizeof(__pyx_k_NullTest), 0, 0, 1, 1},
  {&__pyx_n_u_NullTestType, __pyx_k_NullTestType, sizeof(__pyx_k_NullTestType), 0, 1, 0, 1},
  {&__pyx_n_u_ObjectType, __pyx_k_ObjectType, sizeof(__pyx_k_ObjectType), 0, 1, 0, 1},
  {&__pyx_n_s_ObjectWithArgs, __pyx_k_ObjectWithArgs, sizeof(__pyx_k_ObjectWithArgs), 0, 0, 1, 1},
  {&__pyx_n_u_OnCommitAction, __pyx_k_OnCommitAction, sizeof(__pyx_k_OnCommitAction), 0, 1, 0, 1},
  {&__pyx_n_u_OnConflictAction, __pyx_k_OnConflictAction, sizeof(__pyx_k_OnConflictAction), 0, 1, 0, 1},
  {&__pyx_n_s_OnConflictClause, __pyx_k_OnConflictClause, sizeof(__pyx_k_OnConflictClause), 0, 0, 1, 1},
  {&__pyx_n_s_OnConflictExpr, __pyx_k_OnConflictExpr, sizeof(__pyx_k_OnConflictExpr), 0, 0, 1, 1},
  {&__pyx_n_s_OpExpr, __pyx_k_OpExpr, sizeof(__pyx_k_OpExpr), 0, 0, 1, 1},
  {&__pyx_n_u_OverridingKind, __pyx_k_OverridingKind, sizeof(__pyx_k_OverridingKind), 0, 1, 0, 1},
  {&__pyx_n_s_PLAssignStmt, __pyx_k_PLAssignStmt, sizeof(__pyx_k_PLAssignStmt), 0, 0, 1, 1},
  {&__pyx_n_s_Param, __pyx_k_Param, sizeof(__pyx_k_Param), 0, 0, 1, 1},
  {&__pyx_n_u_ParamKind, __pyx_k_ParamKind, sizeof(__pyx_k_ParamKind), 0, 1, 0, 1},
  {&__pyx_n_s_ParamRef, __pyx_k_ParamRef, sizeof(__pyx_k_ParamRef), 0, 0, 1, 1},
  {&__pyx_n_s_ParseError, __pyx_k_ParseError, sizeof(__pyx_k_ParseError), 0, 0, 1, 1},
  {&__pyx_n_s_ParseError___str, __pyx_k_ParseError___str, sizeof(__pyx_k_ParseError___str), 0, 0, 1, 1},
  {&__pyx_n_s_PartitionBoundSpec, __pyx_k_PartitionBoundSpec, sizeof(__pyx_k_PartitionBoundSpec), 0, 0, 1, 1},
  {&__pyx_n_s_PartitionCmd, __pyx_k_PartitionCmd, sizeof(__pyx_k_PartitionCmd), 0, 0, 1, 1},
  {&__pyx_n_s_PartitionElem, __pyx_k_PartitionElem, sizeof(__pyx_k_PartitionElem), 0, 0, 1, 1},
  {&__pyx_n_s_PartitionRangeDatum, __pyx_k_PartitionRangeDatum, sizeof(__pyx_k_PartitionRangeDatum), 0, 0, 1, 1},
  {&__pyx_n_u_PartitionRangeDatumKind, __pyx_k_PartitionRangeDatumKind, sizeof(__pyx_k_PartitionRangeDatumKind), 0, 1, 0, 1},
  {&__pyx_n_s_PartitionSpec, __pyx_k_PartitionSpec, sizeof(__pyx_k_PartitionSpec), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_PrepareStmt, __pyx_k_PrepareStmt, sizeof(__pyx_k_PrepareStmt), 0, 0, 1, 1},
  {&__pyx_n_s_PublicationObjSpec, __pyx_k_PublicationObjSpec, sizeof(__pyx_k_PublicationObjSpec), 0, 0, 1, 1},
  {&__pyx_n_u_PublicationObjSpecType, __pyx_k_PublicationObjSpecType, sizeof(__pyx_k_PublicationObjSpecType), 0, 1, 0, 1},
  {&__pyx_n_s_PublicationTable, __pyx_k_PublicationTable, sizeof(__pyx_k_PublicationTable), 0, 0, 1, 1},
  {&__pyx_n_s_Query, __pyx_k_Query, sizeof(__pyx_k_Query), 0, 0, 1, 1},
  {&__pyx_n_u_QuerySource, __pyx_k_QuerySource, sizeof(__pyx_k_QuerySource), 0, 1, 0, 1},
  {&__pyx_n_u_RTEKind, __pyx_k_RTEKind, sizeof(__pyx_k_RTEKind), 0, 1, 0, 1},
  {&__pyx_n_s_RangeFunction, __pyx_k_RangeFunction, sizeof(__pyx_k_RangeFunction), 0, 0, 1, 1},
  {&__pyx_n_s_RangeSubselect, __pyx_k_RangeSubselect, sizeof(__pyx_k_RangeSubselect), 0, 0, 1, 1},
  {&__pyx_n_s_RangeTableFunc, __pyx_k_RangeTableFunc, sizeof(__pyx_k_RangeTableFunc), 0, 0, 1, 1},
  {&__pyx_n_s_RangeTableFuncCol, __pyx_k_RangeTableFuncCol, sizeof(__pyx_k_RangeTableFuncCol), 0, 0, 1, 1},
  {&__pyx_n_s_RangeTableSample, __pyx_k_RangeTableSample, sizeof(__pyx_k_RangeTableSample), 0, 0, 1, 1},
  {&__pyx_n_s_RangeTblEntry, __pyx_k_RangeTblEntry, sizeof(__pyx_k_RangeTblEntry), 0, 0, 1, 1},
  {&__pyx_n_s_RangeTblFunction, __pyx_k_RangeTblFunction, sizeof(__pyx_k_RangeTblFunction), 0, 0, 1, 1},
  {&__pyx_n_s_RangeTblRef, __pyx_k_RangeTblRef, sizeof(__pyx_k_RangeTblRef), 0, 0, 1, 1},
  {&__pyx_n_s_RangeVar, __pyx_k_RangeVar, sizeof(__pyx_k_RangeVar), 0, 0, 1, 1},
  {&__pyx_n_s_RawStmt, __pyx_k_RawStmt, sizeof(__pyx_k_RawStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ReassignOwnedStmt, __pyx_k_ReassignOwnedStmt, sizeof(__pyx_k_ReassignOwnedStmt), 0, 0, 1, 1},
  {&__pyx_n_s_RefreshMatViewStmt, __pyx_k_RefreshMatViewStmt, sizeof(__pyx_k_RefreshMatViewStmt), 0, 0, 1, 1},
  {&__pyx_n_u_ReindexObjectType, __pyx_k_ReindexObjectType, sizeof(__pyx_k_ReindexObjectType), 0, 1, 0, 1},
  {&__pyx_n_s_ReindexStmt, __pyx_k_ReindexStmt, sizeof(__pyx_k_ReindexStmt), 0, 0, 1, 1},
  {&__pyx_n_s_RelabelType, __pyx_k_RelabelType, sizeof(__pyx_k_RelabelType), 0, 0, 1, 1},
  {&__pyx_n_s_RenameStmt, __pyx_k_RenameStmt, sizeof(__pyx_k_RenameStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ReplicaIdentityStmt, __pyx_k_ReplicaIdentityStmt, sizeof(__pyx_k_ReplicaIdentityStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ResTarget, __pyx_k_ResTarget, sizeof(__pyx_k_ResTarget), 0, 0, 1, 1},
  {&__pyx_n_s_ReturnStmt, __pyx_k_ReturnStmt, sizeof(__pyx_k_ReturnStmt), 0, 0, 1, 1},
  {&__pyx_n_s_RoleSpec, __pyx_k_RoleSpec, sizeof(__pyx_k_RoleSpec), 0, 0, 1, 1},
  {&__pyx_n_u_RoleSpecType, __pyx_k_RoleSpecType, sizeof(__pyx_k_RoleSpecType), 0, 1, 0, 1},
  {&__pyx_n_u_RoleStmtType, __pyx_k_RoleStmtType, sizeof(__pyx_k_RoleStmtType), 0, 1, 0, 1},
  {&__pyx_n_s_RowCompareExpr, __pyx_k_RowCompareExpr, sizeof(__pyx_k_RowCompareExpr), 0, 0, 1, 1},
  {&__pyx_n_u_RowCompareType, __pyx_k_RowCompareType, sizeof(__pyx_k_RowCompareType), 0, 1, 0, 1},
  {&__pyx_n_s_RowExpr, __pyx_k_RowExpr, sizeof(__pyx_k_RowExpr), 0, 0, 1, 1},
  {&__pyx_n_s_RowMarkClause, __pyx_k_RowMarkClause, sizeof(__pyx_k_RowMarkClause), 0, 0, 1, 1},
  {&__pyx_n_s_RuleStmt, __pyx_k_RuleStmt, sizeof(__pyx_k_RuleStmt), 0, 0, 1, 1},
  {&__pyx_n_s_SQLValueFunction, __pyx_k_SQLValueFunction, sizeof(__pyx_k_SQLValueFunction), 0, 0, 1, 1},
  {&__pyx_n_u_SQLValueFunctionOp, __pyx_k_SQLValueFunctionOp, sizeof(__pyx_k_SQLValueFunctionOp), 0, 1, 0, 1},
  {&__pyx_n_s_ScalarArrayOpExpr, __pyx_k_ScalarArrayOpExpr, sizeof(__pyx_k_ScalarArrayOpExpr), 0, 0, 1, 1},
  {&__pyx_n_s_SecLabelStmt, __pyx_k_SecLabelStmt, sizeof(__pyx_k_SecLabelStmt), 0, 0, 1, 1},
  {&__pyx_n_s_SelectStmt, __pyx_k_SelectStmt, sizeof(__pyx_k_SelectStmt), 0, 0, 1, 1},
  {&__pyx_n_u_SetOperation, __pyx_k_SetOperation, sizeof(__pyx_k_SetOperation), 0, 1, 0, 1},
  {&__pyx_n_s_SetOperationStmt, __pyx_k_SetOperationStmt, sizeof(__pyx_k_SetOperationStmt), 0, 0, 1, 1},
  {&__pyx_n_s_SetToDefault, __pyx_k_SetToDefault, sizeof(__pyx_k_SetToDefault), 0, 0, 1, 1},
  {&__pyx_n_s_SortBy, __pyx_k_SortBy, sizeof(__pyx_k_SortBy), 0, 0, 1, 1},
  {&__pyx_n_u_SortByDir, __pyx_k_SortByDir, sizeof(__pyx_k_SortByDir), 0, 1, 0, 1},
  {&__pyx_n_u_SortByNulls, __pyx_k_SortByNulls, sizeof(__pyx_k_SortByNulls), 0, 1, 0, 1},
  {&__pyx_n_s_SortGroupClause, __pyx_k_SortGroupClause, sizeof(__pyx_k_SortGroupClause), 0, 0, 1, 1},
  {&__pyx_n_s_StatsElem, __pyx_k_StatsElem, sizeof(__pyx_k_StatsElem), 0, 0, 1, 1},
  {&__pyx_n_s_String, __pyx_k_String, sizeof(__pyx_k_String), 0, 0, 1, 1},
  {&__pyx_n_s_SubLink, __pyx_k_SubLink, sizeof(__pyx_k_SubLink), 0, 0, 1, 1},
  {&__pyx_n_u_SubLinkType, __pyx_k_SubLinkType, sizeof(__pyx_k_SubLinkType), 0, 1, 0, 1},
  {&__pyx_n_s_SubPlan, __pyx_k_SubPlan, sizeof(__pyx_k_SubPlan), 0, 0, 1, 1},
  {&__pyx_n_s_SubscriptingRef, __pyx_k_SubscriptingRef, sizeof(__pyx_k_SubscriptingRef), 0, 0, 1, 1},
  {&__pyx_n_s_TableFunc, __pyx_k_TableFunc, sizeof(__pyx_k_TableFunc), 0, 0, 1, 1},
  {&__pyx_n_s_TableLikeClause, __pyx_k_TableLikeClause, sizeof(__pyx_k_TableLikeClause), 0, 0, 1, 1},
  {&__pyx_n_s_TableSampleClause, __pyx_k_TableSampleClause, sizeof(__pyx_k_TableSampleClause), 0, 0, 1, 1},
  {&__pyx_n_s_TargetEntry, __pyx_k_TargetEntry, sizeof(__pyx_k_TargetEntry), 0, 0, 1, 1},
  {&__pyx_n_s_Token, __pyx_k_Token, sizeof(__pyx_k_Token), 0, 0, 1, 1},
  {&__pyx_n_u_Token, __pyx_k_Token, sizeof(__pyx_k_Token), 0, 1, 0, 1},
  {&__pyx_n_s_TransactionStmt, __pyx_k_TransactionStmt, sizeof(__pyx_k_TransactionStmt), 0, 0, 1, 1},
  {&__pyx_n_u_TransactionStmtKind, __pyx_k_TransactionStmtKind, sizeof(__pyx_k_TransactionStmtKind), 0, 1, 0, 1},
  {&__pyx_n_s_TriggerTransition, __pyx_k_TriggerTransition, sizeof(__pyx_k_TriggerTransition), 0, 0, 1, 1},
  {&__pyx_n_s_TruncateStmt, __pyx_k_TruncateStmt, sizeof(__pyx_k_TruncateStmt), 0, 0, 1, 1},
  {&__pyx_n_s_TypeCast, __pyx_k_TypeCast, sizeof(__pyx_k_TypeCast), 0, 0, 1, 1},
  {&__pyx_n_s_TypeName, __pyx_k_TypeName, sizeof(__pyx_k_TypeName), 0, 0, 1, 1},
  {&__pyx_n_u_UNKNOWN, __pyx_k_UNKNOWN, sizeof(__pyx_k_UNKNOWN), 0, 1, 0, 1},
  {&__pyx_kp_u_Unhandled_tag_s, __pyx_k_Unhandled_tag_s, sizeof(__pyx_k_Unhandled_tag_s), 0, 1, 0, 0},
  {&__pyx_n_s_UnlistenStmt, __pyx_k_UnlistenStmt, sizeof(__pyx_k_UnlistenStmt), 0, 0, 1, 1},
  {&__pyx_n_s_UpdateStmt, __pyx_k_UpdateStmt, sizeof(__pyx_k_UpdateStmt), 0, 0, 1, 1},
  {&__pyx_n_s_VacuumRelation, __pyx_k_VacuumRelation, sizeof(__pyx_k_VacuumRelation), 0, 0, 1, 1},
  {&__pyx_n_s_VacuumStmt, __pyx_k_VacuumStmt, sizeof(__pyx_k_VacuumStmt), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Var, __pyx_k_Var, sizeof(__pyx_k_Var), 0, 0, 1, 1},
  {&__pyx_n_u_VariableSetKind, __pyx_k_VariableSetKind, sizeof(__pyx_k_VariableSetKind), 0, 1, 0, 1},
  {&__pyx_n_s_VariableSetStmt, __pyx_k_VariableSetStmt, sizeof(__pyx_k_VariableSetStmt), 0, 0, 1, 1},
  {&__pyx_n_s_VariableShowStmt, __pyx_k_VariableShowStmt, sizeof(__pyx_k_VariableShowStmt), 0, 0, 1, 1},
  {&__pyx_n_u_ViewCheckOption, __pyx_k_ViewCheckOption, sizeof(__pyx_k_ViewCheckOption), 0, 1, 0, 1},
  {&__pyx_n_s_ViewStmt, __pyx_k_ViewStmt, sizeof(__pyx_k_ViewStmt), 0, 0, 1, 1},
  {&__pyx_n_u_WCOKind, __pyx_k_WCOKind, sizeof(__pyx_k_WCOKind), 0, 1, 0, 1},
  {&__pyx_n_s_WindowClause, __pyx_k_WindowClause, sizeof(__pyx_k_WindowClause), 0, 0, 1, 1},
  {&__pyx_n_s_WindowDef, __pyx_k_WindowDef, sizeof(__pyx_k_WindowDef), 0, 0, 1, 1},
  {&__pyx_n_s_WindowFunc, __pyx_k_WindowFunc, sizeof(__pyx_k_WindowFunc), 0, 0, 1, 1},
  {&__pyx_n_s_WithCheckOption, __pyx_k_WithCheckOption, sizeof(__pyx_k_WithCheckOption), 0, 0, 1, 1},
  {&__pyx_n_s_WithClause, __pyx_k_WithClause, sizeof(__pyx_k_WithClause), 0, 0, 1, 1},
  {&__pyx_n_s_XmlExpr, __pyx_k_XmlExpr, sizeof(__pyx_k_XmlExpr), 0, 0, 1, 1},
  {&__pyx_n_u_XmlExprOp, __pyx_k_XmlExprOp, sizeof(__pyx_k_XmlExprOp), 0, 1, 0, 1},
  {&__pyx_n_u_XmlOptionType, __pyx_k_XmlOptionType, sizeof(__pyx_k_XmlOptionType), 0, 1, 0, 1},
  {&__pyx_n_s_XmlSerialize, __pyx_k_XmlSerialize, sizeof(__pyx_k_XmlSerialize), 0, 0, 1, 1},
  {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
  {&__pyx_n_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_ast, __pyx_k_ast, sizeof(__pyx_k_ast), 0, 0, 1, 1},
  {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  {&__pyx_kp_u_at_index, __pyx_k_at_index, sizeof(__pyx_k_at_index), 0, 1, 0, 0},
  {&__pyx_kp_u_at_position, __pyx_k_at_position, sizeof(__pyx_k_at_position), 0, 1, 0, 0},
  {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_cstring, __pyx_k_cstring, sizeof(__pyx_k_cstring), 0, 0, 1, 1},
  {&__pyx_n_s_cur_offset, __pyx_k_cur_offset, sizeof(__pyx_k_cur_offset), 0, 0, 1, 1},
  {&__pyx_n_s_cursorpos, __pyx_k_cursorpos, sizeof(__pyx_k_cursorpos), 0, 0, 1, 1},
  {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_deparse_protobuf, __pyx_k_deparse_protobuf, sizeof(__pyx_k_deparse_protobuf), 0, 0, 1, 1},
  {&__pyx_n_s_deparsed, __pyx_k_deparsed, sizeof(__pyx_k_deparsed), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_u_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 1, 0, 1},
  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {&__pyx_n_s_enums, __pyx_k_enums, sizeof(__pyx_k_enums), 0, 0, 1, 1},
  {&__pyx_n_s_fingerprint, __pyx_k_fingerprint, sizeof(__pyx_k_fingerprint), 0, 0, 1, 1},
  {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
  {&__pyx_n_s_get_postgresql_version, __pyx_k_get_postgresql_version, sizeof(__pyx_k_get_postgresql_version), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
  {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
  {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_u_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 1, 0, 1},
  {&__pyx_n_s_kwkind, __pyx_k_kwkind, sizeof(__pyx_k_kwkind), 0, 0, 1, 1},
  {&__pyx_n_s_location, __pyx_k_location, sizeof(__pyx_k_location), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
  {&__pyx_n_s_mctx, __pyx_k_mctx, sizeof(__pyx_k_mctx), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_u_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 0, 1},
  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
  {&__pyx_n_s_offset_to_index, __pyx_k_offset_to_index, sizeof(__pyx_k_offset_to_index), 0, 0, 1, 1},
  {&__pyx_n_s_only_slices, __pyx_k_only_slices, sizeof(__pyx_k_only_slices), 0, 0, 1, 1},
  {&__pyx_n_s_parse_plpgsql_json, __pyx_k_parse_plpgsql_json, sizeof(__pyx_k_parse_plpgsql_json), 0, 0, 1, 1},
  {&__pyx_n_s_parse_sql, __pyx_k_parse_sql, sizeof(__pyx_k_parse_sql), 0, 0, 1, 1},
  {&__pyx_n_s_parse_sql_json, __pyx_k_parse_sql_json, sizeof(__pyx_k_parse_sql_json), 0, 0, 1, 1},
  {&__pyx_n_s_parse_sql_protobuf, __pyx_k_parse_sql_protobuf, sizeof(__pyx_k_parse_sql_protobuf), 0, 0, 1, 1},
  {&__pyx_n_s_parsed, __pyx_k_parsed, sizeof(__pyx_k_parsed), 0, 0, 1, 1},
  {&__pyx_n_s_pglast, __pyx_k_pglast, sizeof(__pyx_k_pglast), 0, 0, 1, 1},
  {&__pyx_n_s_pglast_parser, __pyx_k_pglast_parser, sizeof(__pyx_k_pglast_parser), 0, 0, 1, 1},
  {&__pyx_kp_s_pglast_parser_pyx, __pyx_k_pglast_parser_pyx, sizeof(__pyx_k_pglast_parser_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_prev_offset, __pyx_k_prev_offset, sizeof(__pyx_k_prev_offset), 0, 0, 1, 1},
  {&__pyx_n_s_protobuf, __pyx_k_protobuf, sizeof(__pyx_k_protobuf), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Displacements, __pyx_k_pyx_unpickle_Displacements, sizeof(__pyx_k_pyx_unpickle_Displacements), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_query, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_s_scan, __pyx_k_scan, sizeof(__pyx_k_scan), 0, 0, 1, 1},
  {&__pyx_n_s_scan_result, __pyx_k_scan_result, sizeof(__pyx_k_scan_result), 0, 0, 1, 1},
  {&__pyx_n_s_scan_token, __pyx_k_scan_token, sizeof(__pyx_k_scan_token), 0, 0, 1, 1},
  {&__pyx_n_s_scanned, __pyx_k_scanned, sizeof(__pyx_k_scanned), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_splitted, __pyx_k_splitted, sizeof(__pyx_k_splitted), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_u_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 1, 0, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_stmt, __pyx_k_stmt, sizeof(__pyx_k_stmt), 0, 0, 1, 1},
  {&__pyx_n_s_stmts, __pyx_k_stmts, sizeof(__pyx_k_stmts), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_tkind, __pyx_k_tkind, sizeof(__pyx_k_tkind), 0, 0, 1, 1},
  {&__pyx_n_s_token, __pyx_k_token, sizeof(__pyx_k_token), 0, 0, 1, 1},
  {&__pyx_n_s_tree, __pyx_k_tree, sizeof(__pyx_k_tree), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1},
  {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_with_parser, __pyx_k_with_parser, sizeof(__pyx_k_with_parser), 0, 0, 1, 1},
  #endif
  {0, 0, 0, 0, 0, 0, 0}
};
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 46, __pyx_L1_error)
  __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) __PYX_ERR(0, 283, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 2560, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(1, 223, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x236a782, 0x2e307f9, 0x7645d40):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x236a782, 0x2e307f9, 0x7645d40) = (displacements, max_offset))" % __pyx_checksum
 */
  __pyx_tuple__2 = PyTuple_Pack(3, __pyx_int_37136258, __pyx_int_48433145, __pyx_int_124017984); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "pglast/parser.pyx":28
 *     "Exception representing the error state returned by the PG parser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */
  __pyx_tuple__4 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_location); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_str, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(1, 28, __pyx_L1_error)

  /* "pglast/parser.pyx":40
 *     "Exception representing the error state returned by the PG deparser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_str, 40, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(1, 40, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__7 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Displacements__set_state(self, __pyx_state)
 */
  __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "pglast/parser.pyx":239
 * 
 * 
 * def get_postgresql_version():             # <<<<<<<<<<<<<<
 *     "Return the ``PostgreSQL`` version as a tuple (`major`, `minor`)."
 * 
 */
  __pyx_tuple__11 = PyTuple_Pack(3, __pyx_n_s_version, __pyx_n_s_major, __pyx_n_s_minor); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_get_postgresql_version, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(1, 239, __pyx_L1_error)

  /* "pglast/parser.pyx":247
 * 
 * 
 * def parse_sql(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its abstract syntax tree."
 * 
 */
  __pyx_tuple__13 = PyTuple_Pack(10, __pyx_n_s_query, __pyx_n_s_parsed, __pyx_n_s_mctx, __pyx_n_s_i, __pyx_n_s_cstring, __pyx_n_s_utf8, __pyx_n_s_offset_to_index, __pyx_n_s_stmts, __pyx_n_s_item, __pyx_n_s_message); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_parse_sql, 247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 247, __pyx_L1_error)

  /* "pglast/parser.pyx":281
 * 
 * 
 * def parse_sql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(6, __pyx_n_s_query, __pyx_n_s_parsed, __pyx_n_s_cstring, __pyx_n_s_utf8, __pyx_n_s_message, __pyx_n_s_offset_to_index); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_parse_sql_json, 281, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 281, __pyx_L1_error)

  /* "pglast/parser.pyx":305
 * 
 * 
 * def parse_sql_protobuf(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``protobuf`` encoded syntax tree."
 * 
 */
  __pyx_tuple__17 = PyTuple_Pack(7, __pyx_n_s_query, __pyx_n_s_parsed, __pyx_n_s_cstring, __pyx_n_s_utf8, __pyx_n_s_message, __pyx_n_s_cursorpos, __pyx_n_s_offset_to_index); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_parse_sql_protobuf, 305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(1, 305, __pyx_L1_error)

  /* "pglast/parser.pyx":330
 * 
 * 
 * def parse_plpgsql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``pgpgsql`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_parse_plpgsql_json, 330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(1, 330, __pyx_L1_error)

  /* "pglast/parser.pyx":354
 * 
 * 
 * def fingerprint(str query):             # <<<<<<<<<<<<<<
 *     "Compute and return a *signature* of the given ``SQL`` `query`."
 * 
 */
  __pyx_tuple__20 = PyTuple_Pack(6, __pyx_n_s_query, __pyx_n_s_result, __pyx_n_s_cstring, __pyx_n_s_utf8, __pyx_n_s_message, __pyx_n_s_offset_to_index); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_fingerprint, 354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(1, 354, __pyx_L1_error)

  /* "pglast/parser.pyx":378
 * 
 * 
 * def split(str stmts, bint with_parser=True, bint only_slices=False):             # <<<<<<<<<<<<<<
 *     """Split the given `stmts` string into a sequence of the single ``SQL`` statements.
 * 
 */
  __pyx_tuple__22 = PyTuple_Pack(15, __pyx_n_s_stmts, __pyx_n_s_with_parser, __pyx_n_s_only_slices, __pyx_n_s_splitted, __pyx_n_s_cstring, __pyx_n_s_i, __pyx_n_s_prev_offset, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_utf8, __pyx_n_s_message, __pyx_n_s_offset_to_index, __pyx_n_s_result, __pyx_n_s_stmt, __pyx_n_s_cur_offset); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_split, 378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 378, __pyx_L1_error)

  /* "pglast/parser.pyx":431
 * 
 * 
 * def deparse_protobuf(bytes protobuf):             # <<<<<<<<<<<<<<
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
 * 
 */
  __pyx_tuple__24 = PyTuple_Pack(4, __pyx_n_s_protobuf, __pyx_n_s_tree, __pyx_n_s_deparsed, __pyx_n_s_message); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_deparse_protobuf, 431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(1, 431, __pyx_L1_error)

  /* "pglast/parser.pyx":452
 * 
 * 
 * Token = namedtuple('Token', ('start', 'end', 'name', 'kind'))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__26 = PyTuple_Pack(4, __pyx_n_u_start, __pyx_n_u_end, __pyx_n_u_name_2, __pyx_n_u_kind); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_u_Token, __pyx_tuple__26); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "pglast/parser.pyx":455
 * 
 * 
 * def scan(str query):             # <<<<<<<<<<<<<<
 *     "Lexify the given ``SQL`` `query` and return a list of its lexical tokens."
 * 
 */
  __pyx_tuple__28 = PyTuple_Pack(13, __pyx_n_s_query, __pyx_n_s_scanned, __pyx_n_s_scan_result, __pyx_n_s_scan_token, __pyx_n_s_tkind, __pyx_n_s_kwkind, __pyx_n_s_cstring, __pyx_n_s_i, __pyx_n_s_utf8, __pyx_n_s_offset_to_index, __pyx_n_s_message, __pyx_n_s_result, __pyx_n_s_token); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pglast_parser_pyx, __pyx_n_s_scan, 455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(1, 455, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__30 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Displacements, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  __pyx_umethod_PyUnicode_Type_index.type = (PyObject*)&PyUnicode_Type;
  __pyx_umethod_PyUnicode_Type_index.method_name = &__pyx_n_s_index;
  #if CYTHON_USE_MODULE_STATE
  if (__Pyx_InitString(__pyx_string_tab[0], &__pyx_kp_u_) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[1], &__pyx_kp_u_0) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[2], &__pyx_n_s_A_ArrayExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[3], &__pyx_n_s_A_Const) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[4], &__pyx_n_s_A_Expr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[5], &__pyx_n_u_A_Expr_Kind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[6], &__pyx_n_s_A_Indices) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[7], &__pyx_n_s_A_Indirection) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[8], &__pyx_n_s_A_Star) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[9], &__pyx_n_s_AccessPriv) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[10], &__pyx_n_u_AggSplit) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[11], &__pyx_n_s_Aggref) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[12], &__pyx_n_s_Alias) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[13], &__pyx_n_s_AlterCollationStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[14], &__pyx_n_s_AlterDatabaseRefreshCollStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[15], &__pyx_n_s_AlterDatabaseSetStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[16], &__pyx_n_s_AlterDatabaseStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[17], &__pyx_n_s_AlterDefaultPrivilegesStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[18], &__pyx_n_s_AlterDomainStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[19], &__pyx_n_s_AlterEnumStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[20], &__pyx_n_s_AlterEventTrigStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[21], &__pyx_n_s_AlterExtensionContentsStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[22], &__pyx_n_s_AlterExtensionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[23], &__pyx_n_s_AlterFdwStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[24], &__pyx_n_s_AlterForeignServerStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[25], &__pyx_n_s_AlterFunctionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[26], &__pyx_n_s_AlterObjectDependsStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[27], &__pyx_n_s_AlterObjectSchemaStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[28], &__pyx_n_s_AlterOpFamilyStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[29], &__pyx_n_s_AlterOperatorStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[30], &__pyx_n_s_AlterOwnerStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[31], &__pyx_n_s_AlterPolicyStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[32], &__pyx_n_u_AlterPublicationAction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[33], &__pyx_n_s_AlterPublicationStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[34], &__pyx_n_s_AlterRoleSetStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[35], &__pyx_n_s_AlterRoleStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[36], &__pyx_n_s_AlterSeqStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[37], &__pyx_n_s_AlterStatsStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[38], &__pyx_n_s_AlterSubscriptionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[39], &__pyx_n_u_AlterSubscriptionType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[40], &__pyx_n_s_AlterSystemStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[41], &__pyx_n_u_AlterTSConfigType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[42], &__pyx_n_s_AlterTSConfigurationStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[43], &__pyx_n_s_AlterTSDictionaryStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[44], &__pyx_n_s_AlterTableCmd) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[45], &__pyx_n_s_AlterTableMoveAllStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[46], &__pyx_n_s_AlterTableSpaceOptionsStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[47], &__pyx_n_s_AlterTableStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[48], &__pyx_n_u_AlterTableType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[49], &__pyx_n_s_AlterTypeStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[50], &__pyx_n_s_AlterUserMappingStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[51], &__pyx_n_s_AlternativeSubPlan) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[52], &__pyx_n_s_ArrayCoerceExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[53], &__pyx_n_s_ArrayExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[54], &__pyx_n_s_BitString) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[55], &__pyx_n_s_BoolExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[56], &__pyx_n_u_BoolExprType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[57], &__pyx_n_u_BoolTestType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[58], &__pyx_n_s_Boolean) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[59], &__pyx_n_s_BooleanTest) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[60], &__pyx_n_s_CTECycleClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[61], &__pyx_n_u_CTEMaterialize) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[62], &__pyx_n_s_CTESearchClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[63], &__pyx_n_s_CallContext) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[64], &__pyx_n_s_CallStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[65], &__pyx_n_s_CaseExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[66], &__pyx_n_s_CaseTestExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[67], &__pyx_n_s_CaseWhen) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[68], &__pyx_n_s_CheckPointStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[69], &__pyx_n_s_ClosePortalStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[70], &__pyx_n_s_ClusterStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[71], &__pyx_n_u_CmdType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[72], &__pyx_n_s_CoalesceExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[73], &__pyx_n_s_CoerceToDomain) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[74], &__pyx_n_s_CoerceToDomainValue) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[75], &__pyx_n_s_CoerceViaIO) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[76], &__pyx_n_u_CoercionContext) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[77], &__pyx_n_u_CoercionForm) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[78], &__pyx_n_s_CollateClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[79], &__pyx_n_s_CollateExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[80], &__pyx_n_s_ColumnDef) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[81], &__pyx_n_s_ColumnRef) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[82], &__pyx_n_s_CommentStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[83], &__pyx_n_s_CommonTableExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[84], &__pyx_n_s_CompositeTypeStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[85], &__pyx_n_u_ConstrType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[86], &__pyx_n_s_Constraint) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[87], &__pyx_n_s_ConstraintsSetStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[88], &__pyx_n_s_ConvertRowtypeExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[89], &__pyx_n_s_CopyStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[90], &__pyx_n_s_CreateAmStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[91], &__pyx_n_s_CreateCastStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[92], &__pyx_n_s_CreateConversionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[93], &__pyx_n_s_CreateDomainStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[94], &__pyx_n_s_CreateEnumStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[95], &__pyx_n_s_CreateEventTrigStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[96], &__pyx_n_s_CreateExtensionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[97], &__pyx_n_s_CreateFdwStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[98], &__pyx_n_s_CreateForeignServerStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[99], &__pyx_n_s_CreateForeignTableStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[100], &__pyx_n_s_CreateFunctionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[101], &__pyx_n_s_CreateOpClassItem) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[102], &__pyx_n_s_CreateOpClassStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[103], &__pyx_n_s_CreateOpFamilyStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[104], &__pyx_n_s_CreatePLangStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[105], &__pyx_n_s_CreatePolicyStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[106], &__pyx_n_s_CreatePublicationStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[107], &__pyx_n_s_CreateRangeStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[108], &__pyx_n_s_CreateRoleStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[109], &__pyx_n_s_CreateSchemaStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[110], &__pyx_n_s_CreateSeqStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[111], &__pyx_n_s_CreateStatsStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[112], &__pyx_n_s_CreateStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[113], &__pyx_n_s_CreateSubscriptionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[114], &__pyx_n_s_CreateTableAsStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[115], &__pyx_n_s_CreateTableSpaceStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[116], &__pyx_n_s_CreateTransformStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[117], &__pyx_n_s_CreateTrigStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[118], &__pyx_n_s_CreateUserMappingStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[119], &__pyx_n_s_CreatedbStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[120], &__pyx_n_s_CurrentOfExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[121], &__pyx_n_s_DeallocateStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[122], &__pyx_n_s_Decimal) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[123], &__pyx_n_s_DeclareCursorStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[124], &__pyx_n_s_DefElem) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[125], &__pyx_n_u_DefElemAction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[126], &__pyx_n_s_DefineStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[127], &__pyx_n_s_DeleteStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[128], &__pyx_n_s_DeparseError) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[129], &__pyx_n_s_DeparseError___str) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[130], &__pyx_n_u_DiscardMode) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[131], &__pyx_n_s_DiscardStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[132], &__pyx_n_s_Displacements) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[133], &__pyx_n_s_Displacements___reduce_cython) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[134], &__pyx_n_s_Displacements___setstate_cython) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[135], &__pyx_n_s_DoStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[136], &__pyx_n_u_DropBehavior) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[137], &__pyx_n_s_DropOwnedStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[138], &__pyx_n_s_DropRoleStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[139], &__pyx_n_s_DropStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[140], &__pyx_n_s_DropSubscriptionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[141], &__pyx_n_s_DropTableSpaceStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[142], &__pyx_n_s_DropUserMappingStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[143], &__pyx_n_s_DropdbStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[144], &__pyx_n_s_Error) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[145], &__pyx_kp_s_Exception_representing_the_error) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[146], &__pyx_kp_s_Exception_representing_the_error_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[147], &__pyx_n_s_ExecuteStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[148], &__pyx_n_s_ExplainStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[149], &__pyx_n_u_FetchDirection) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[150], &__pyx_n_s_FetchStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[151], &__pyx_n_s_FieldSelect) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[152], &__pyx_n_s_FieldStore) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[153], &__pyx_n_s_Float) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[154], &__pyx_n_s_FromExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[155], &__pyx_n_s_FuncCall) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[156], &__pyx_n_s_FuncExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[157], &__pyx_n_s_FunctionParameter) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[158], &__pyx_n_u_FunctionParameterMode) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[159], &__pyx_n_s_GrantRoleStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[160], &__pyx_n_s_GrantStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[161], &__pyx_n_u_GrantTargetType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[162], &__pyx_n_s_GroupingFunc) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[163], &__pyx_n_s_GroupingSet) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[164], &__pyx_n_u_GroupingSetKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[165], &__pyx_n_s_ImportForeignSchemaStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[166], &__pyx_n_u_ImportForeignSchemaType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[167], &__pyx_kp_s_Incompatible_checksums_0x_x_vs_0) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[168], &__pyx_n_s_IndexElem) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[169], &__pyx_n_s_IndexStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[170], &__pyx_n_s_InferClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[171], &__pyx_n_s_InferenceElem) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[172], &__pyx_n_s_InlineCodeBlock) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[173], &__pyx_n_s_InsertStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[174], &__pyx_n_s_Integer) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[175], &__pyx_n_s_IntoClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[176], &__pyx_n_s_JoinExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[177], &__pyx_n_u_JoinType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[178], &__pyx_n_s_LONG_MAX) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[179], &__pyx_n_u_LimitOption) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[180], &__pyx_n_s_ListenStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[181], &__pyx_n_s_LoadStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[182], &__pyx_n_u_LockClauseStrength) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[183], &__pyx_n_s_LockStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[184], &__pyx_n_u_LockWaitPolicy) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[185], &__pyx_n_s_LockingClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[186], &__pyx_n_s_MergeAction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[187], &__pyx_n_s_MergeStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[188], &__pyx_n_s_MergeWhenClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[189], &__pyx_n_s_MinMaxExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[190], &__pyx_n_u_MinMaxOp) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[191], &__pyx_n_s_MultiAssignRef) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[192], &__pyx_n_s_NamedArgExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[193], &__pyx_n_s_NotifyStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[194], &__pyx_n_s_NullTest) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[195], &__pyx_n_u_NullTestType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[196], &__pyx_n_u_ObjectType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[197], &__pyx_n_s_ObjectWithArgs) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[198], &__pyx_n_u_OnCommitAction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[199], &__pyx_n_u_OnConflictAction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[200], &__pyx_n_s_OnConflictClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[201], &__pyx_n_s_OnConflictExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[202], &__pyx_n_s_OpExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[203], &__pyx_n_u_OverridingKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[204], &__pyx_n_s_PLAssignStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[205], &__pyx_n_s_Param) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[206], &__pyx_n_u_ParamKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[207], &__pyx_n_s_ParamRef) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[208], &__pyx_n_s_ParseError) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[209], &__pyx_n_s_ParseError___str) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[210], &__pyx_n_s_PartitionBoundSpec) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[211], &__pyx_n_s_PartitionCmd) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[212], &__pyx_n_s_PartitionElem) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[213], &__pyx_n_s_PartitionRangeDatum) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[214], &__pyx_n_u_PartitionRangeDatumKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[215], &__pyx_n_s_PartitionSpec) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[216], &__pyx_n_s_PickleError) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[217], &__pyx_n_s_PrepareStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[218], &__pyx_n_s_PublicationObjSpec) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[219], &__pyx_n_u_PublicationObjSpecType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[220], &__pyx_n_s_PublicationTable) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[221], &__pyx_n_s_Query) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[222], &__pyx_n_u_QuerySource) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[223], &__pyx_n_u_RTEKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[224], &__pyx_n_s_RangeFunction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[225], &__pyx_n_s_RangeSubselect) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[226], &__pyx_n_s_RangeTableFunc) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[227], &__pyx_n_s_RangeTableFuncCol) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[228], &__pyx_n_s_RangeTableSample) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[229], &__pyx_n_s_RangeTblEntry) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[230], &__pyx_n_s_RangeTblFunction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[231], &__pyx_n_s_RangeTblRef) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[232], &__pyx_n_s_RangeVar) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[233], &__pyx_n_s_RawStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[234], &__pyx_n_s_ReassignOwnedStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[235], &__pyx_n_s_RefreshMatViewStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[236], &__pyx_n_u_ReindexObjectType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[237], &__pyx_n_s_ReindexStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[238], &__pyx_n_s_RelabelType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[239], &__pyx_n_s_RenameStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[240], &__pyx_n_s_ReplicaIdentityStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[241], &__pyx_n_s_ResTarget) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[242], &__pyx_n_s_ReturnStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[243], &__pyx_n_s_RoleSpec) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[244], &__pyx_n_u_RoleSpecType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[245], &__pyx_n_u_RoleStmtType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[246], &__pyx_n_s_RowCompareExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[247], &__pyx_n_u_RowCompareType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[248], &__pyx_n_s_RowExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[249], &__pyx_n_s_RowMarkClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[250], &__pyx_n_s_RuleStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[251], &__pyx_n_s_SQLValueFunction) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[252], &__pyx_n_u_SQLValueFunctionOp) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[253], &__pyx_n_s_ScalarArrayOpExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[254], &__pyx_n_s_SecLabelStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[255], &__pyx_n_s_SelectStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[256], &__pyx_n_u_SetOperation) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[257], &__pyx_n_s_SetOperationStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[258], &__pyx_n_s_SetToDefault) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[259], &__pyx_n_s_SortBy) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[260], &__pyx_n_u_SortByDir) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[261], &__pyx_n_u_SortByNulls) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[262], &__pyx_n_s_SortGroupClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[263], &__pyx_n_s_StatsElem) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[264], &__pyx_n_s_String) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[265], &__pyx_n_s_SubLink) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[266], &__pyx_n_u_SubLinkType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[267], &__pyx_n_s_SubPlan) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[268], &__pyx_n_s_SubscriptingRef) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[269], &__pyx_n_s_TableFunc) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[270], &__pyx_n_s_TableLikeClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[271], &__pyx_n_s_TableSampleClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[272], &__pyx_n_s_TargetEntry) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[273], &__pyx_n_s_Token) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[274], &__pyx_n_u_Token) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[275], &__pyx_n_s_TransactionStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[276], &__pyx_n_u_TransactionStmtKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[277], &__pyx_n_s_TriggerTransition) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[278], &__pyx_n_s_TruncateStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[279], &__pyx_n_s_TypeCast) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[280], &__pyx_n_s_TypeName) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[281], &__pyx_n_u_UNKNOWN) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[282], &__pyx_kp_u_Unhandled_tag_s) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[283], &__pyx_n_s_UnlistenStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[284], &__pyx_n_s_UpdateStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[285], &__pyx_n_s_VacuumRelation) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[286], &__pyx_n_s_VacuumStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[287], &__pyx_n_s_ValueError) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[288], &__pyx_n_s_Var) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[289], &__pyx_n_u_VariableSetKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[290], &__pyx_n_s_VariableSetStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[291], &__pyx_n_s_VariableShowStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[292], &__pyx_n_u_ViewCheckOption) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[293], &__pyx_n_s_ViewStmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[294], &__pyx_n_u_WCOKind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[295], &__pyx_n_s_WindowClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[296], &__pyx_n_s_WindowDef) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[297], &__pyx_n_s_WindowFunc) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[298], &__pyx_n_s_WithCheckOption) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[299], &__pyx_n_s_WithClause) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[300], &__pyx_n_s_XmlExpr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[301], &__pyx_n_u_XmlExprOp) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[302], &__pyx_n_u_XmlOptionType) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[303], &__pyx_n_s_XmlSerialize) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[304], &__pyx_n_s__3) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[305], &__pyx_n_s__32) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[306], &__pyx_n_s_args) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[307], &__pyx_n_s_ast) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[308], &__pyx_n_s_asyncio_coroutines) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[309], &__pyx_kp_u_at_index) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[310], &__pyx_kp_u_at_position) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[311], &__pyx_n_s_chr) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[312], &__pyx_n_s_cline_in_traceback) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[313], &__pyx_n_s_collections) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[314], &__pyx_n_s_cstring) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[315], &__pyx_n_s_cur_offset) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[316], &__pyx_n_s_cursorpos) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[317], &__pyx_n_s_decimal) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[318], &__pyx_n_s_decode) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[319], &__pyx_n_s_deparse_protobuf) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[320], &__pyx_n_s_deparsed) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[321], &__pyx_n_s_dict) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[322], &__pyx_n_s_dict_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[323], &__pyx_kp_u_disable) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[324], &__pyx_n_s_doc) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[325], &__pyx_kp_u_enable) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[326], &__pyx_n_s_end) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[327], &__pyx_n_u_end) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[328], &__pyx_n_s_endswith) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[329], &__pyx_n_s_enums) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[330], &__pyx_n_s_fingerprint) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[331], &__pyx_kp_u_gc) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[332], &__pyx_n_s_get_postgresql_version) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[333], &__pyx_n_s_getstate) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[334], &__pyx_n_s_i) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[335], &__pyx_n_s_import) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[336], &__pyx_n_s_index) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[337], &__pyx_n_s_init_subclass) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[338], &__pyx_n_s_is_coroutine) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[339], &__pyx_kp_u_isenabled) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[340], &__pyx_n_s_item) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[341], &__pyx_n_u_kind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[342], &__pyx_n_s_kwkind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[343], &__pyx_n_s_location) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[344], &__pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[345], &__pyx_n_s_major) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[346], &__pyx_n_s_mctx) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[347], &__pyx_n_s_message) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[348], &__pyx_n_s_metaclass) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[349], &__pyx_n_s_minor) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[350], &__pyx_n_s_module) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[351], &__pyx_n_s_mro_entries) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[352], &__pyx_n_s_name) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[353], &__pyx_n_u_name_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[354], &__pyx_n_s_namedtuple) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[355], &__pyx_n_s_new) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[356], &__pyx_n_s_offset) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[357], &__pyx_n_s_offset_to_index) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[358], &__pyx_n_s_only_slices) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[359], &__pyx_n_s_parse_plpgsql_json) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[360], &__pyx_n_s_parse_sql) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[361], &__pyx_n_s_parse_sql_json) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[362], &__pyx_n_s_parse_sql_protobuf) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[363], &__pyx_n_s_parsed) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[364], &__pyx_n_s_pglast) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[365], &__pyx_n_s_pglast_parser) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[366], &__pyx_kp_s_pglast_parser_pyx) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[367], &__pyx_n_s_pickle) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[368], &__pyx_n_s_prepare) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[369], &__pyx_n_s_prev_offset) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[370], &__pyx_n_s_protobuf) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[371], &__pyx_n_s_pyx_PickleError) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[372], &__pyx_n_s_pyx_checksum) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[373], &__pyx_n_s_pyx_result) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[374], &__pyx_n_s_pyx_state) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[375], &__pyx_n_s_pyx_type) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[376], &__pyx_n_s_pyx_unpickle_Displacements) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[377], &__pyx_n_s_qualname) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[378], &__pyx_n_s_query) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[379], &__pyx_n_s_range) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[380], &__pyx_n_s_reduce) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[381], &__pyx_n_s_reduce_cython) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[382], &__pyx_n_s_reduce_ex) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[383], &__pyx_n_s_result) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[384], &__pyx_n_s_reversed) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[385], &__pyx_n_s_s) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[386], &__pyx_n_s_scan) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[387], &__pyx_n_s_scan_result) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[388], &__pyx_n_s_scan_token) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[389], &__pyx_n_s_scanned) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[390], &__pyx_n_s_self) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[391], &__pyx_n_s_set_name) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[392], &__pyx_n_s_setstate) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[393], &__pyx_n_s_setstate_cython) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[394], &__pyx_n_s_split) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[395], &__pyx_n_s_splitted) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[396], &__pyx_n_s_start) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[397], &__pyx_n_u_start) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[398], &__pyx_n_s_state) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[399], &__pyx_n_s_stmt) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[400], &__pyx_n_s_stmts) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[401], &__pyx_n_s_str) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[402], &__pyx_kp_s_stringsource) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[403], &__pyx_n_s_strip) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[404], &__pyx_n_s_super) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[405], &__pyx_n_s_test) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[406], &__pyx_n_s_tkind) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[407], &__pyx_n_s_token) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[408], &__pyx_n_s_tree) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[409], &__pyx_n_s_type) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[410], &__pyx_n_s_update) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[411], &__pyx_n_s_use_setstate) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[412], &__pyx_n_s_utf8) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[413], &__pyx_kp_u_utf_8) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[414], &__pyx_n_s_version) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[415], &__pyx_n_s_with_parser) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  #endif
  #if !CYTHON_USE_MODULE_STATE
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  #endif
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_10000 = PyInt_FromLong(10000L); if (unlikely(!__pyx_int_10000)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_37136258 = PyInt_FromLong(37136258L); if (unlikely(!__pyx_int_37136258)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_48433145 = PyInt_FromLong(48433145L); if (unlikely(!__pyx_int_48433145)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_int_124017984 = PyInt_FromLong(124017984L); if (unlikely(!__pyx_int_124017984)) __PYX_ERR(1, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  return 0;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6pglast_6parser_Displacements = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pglast_6parser_Displacements_spec, NULL); if (unlikely(!__pyx_ptype_6pglast_6parser_Displacements)) __PYX_ERR(1, 175, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pglast_6parser_Displacements_spec, __pyx_ptype_6pglast_6parser_Displacements) < 0) __PYX_ERR(1, 175, __pyx_L1_error)
  #else
  __pyx_ptype_6pglast_6parser_Displacements = &__pyx_type_6pglast_6parser_Displacements;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6pglast_6parser_Displacements) < 0) __PYX_ERR(1, 175, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6pglast_6parser_Displacements->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6pglast_6parser_Displacements->tp_dictoffset && __pyx_ptype_6pglast_6parser_Displacements->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6pglast_6parser_Displacements->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Displacements, (PyObject *) __pyx_ptype_6pglast_6parser_Displacements) < 0) __PYX_ERR(1, 175, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6pglast_6parser_Displacements) < 0) __PYX_ERR(1, 175, __pyx_L1_error)
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_parser(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_parser},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "parser",
      0, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initparser(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initparser(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_parser(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_parser(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_parser(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'parser' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("parser", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
  #elif CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely((add_module_result < 0))) __PYX_ERR(1, 1, __pyx_L1_error)
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_parser(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_pglast__parser) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pglast.parser")) {
      if (unlikely((PyDict_SetItemString(modules, "pglast.parser", __pyx_m) < 0))) __PYX_ERR(1, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(1, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(1, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif

  /* "pglast/parser.pyx":16
 * from libc cimport limits
 * 
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * 
 * from . import Error
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_namedtuple);
  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_namedtuple);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pglast/parser.pyx":18
 * from collections import namedtuple
 * 
 * from . import Error             # <<<<<<<<<<<<<<
 * from . cimport structs
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Error);
  __Pyx_GIVEREF(__pyx_n_s_Error);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s__3, __pyx_t_3, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_3) < 0) __PYX_ERR(1, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/ast.pyx":13
 * from cpython.tuple cimport PyTuple_New, PyTuple_SET_ITEM
 * 
 * from decimal import Decimal             # <<<<<<<<<<<<<<
 * 
 * from pglast import ast, enums
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Decimal);
  __Pyx_GIVEREF(__pyx_n_s_Decimal);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Decimal);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_decimal, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Decimal, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pglast/ast.pyx":15
 * from decimal import Decimal
 * 
 * from pglast import ast, enums             # <<<<<<<<<<<<<<
 * from pglast cimport structs
 * 
 */
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_ast);
  __Pyx_GIVEREF(__pyx_n_s_ast);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ast);
  __Pyx_INCREF(__pyx_n_s_enums);
  __Pyx_GIVEREF(__pyx_n_s_enums);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_enums);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pglast, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ast, __pyx_t_3) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_enums, __pyx_t_3) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":25
 * 
 * 
 * class ParseError(Error):             # <<<<<<<<<<<<<<
 *     "Exception representing the error state returned by the PG parser."
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_ParseError, __pyx_n_s_ParseError, (PyObject *) NULL, __pyx_n_s_pglast_parser, __pyx_kp_s_Exception_representing_the_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_2 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(1, 25, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pglast/parser.pyx":28
 *     "Exception representing the error state returned by the PG parser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_10ParseError_1__str__, 0, __pyx_n_s_ParseError___str, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_str, __pyx_t_3) < 0) __PYX_ERR(1, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pglast/parser.pyx":25
 * 
 * 
 * class ParseError(Error):             # <<<<<<<<<<<<<<
 *     "Exception representing the error state returned by the PG parser."
 * 
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_ParseError, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParseError, __pyx_t_3) < 0) __PYX_ERR(1, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":37
 * 
 * 
 * class DeparseError(Error):             # <<<<<<<<<<<<<<
 *     "Exception representing the error state returned by the PG deparser."
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_DeparseError, __pyx_n_s_DeparseError, (PyObject *) NULL, __pyx_n_s_pglast_parser, __pyx_kp_s_Exception_representing_the_error_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_2 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(1, 37, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pglast/parser.pyx":40
 *     "Exception representing the error state returned by the PG deparser."
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         message = self.args[0]
 *         if len(self.args) > 1:
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_12DeparseError_1__str__, 0, __pyx_n_s_DeparseError___str, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_str, __pyx_t_4) < 0) __PYX_ERR(1, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pglast/parser.pyx":37
 * 
 * 
 * class DeparseError(Error):             # <<<<<<<<<<<<<<
 *     "Exception representing the error state returned by the PG deparser."
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_DeparseError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeparseError, __pyx_t_4) < 0) __PYX_ERR(1, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":172
 * 
 * 
 * LONG_MAX = limits.LONG_MAX             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(LONG_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG_MAX, __pyx_t_2) < 0) __PYX_ERR(1, 172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_13Displacements_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Displacements___reduce_cython, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pglast_6parser_Displacements->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pglast_6parser_Displacements);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Displacements, (type(self), 0x236a782, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Displacements__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_13Displacements_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Displacements___setstate_cython, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6pglast_6parser_Displacements->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6pglast_6parser_Displacements);

  /* "pglast/parser.pyx":239
 * 
 * 
 * def get_postgresql_version():             # <<<<<<<<<<<<<<
 *     "Return the ``PostgreSQL`` version as a tuple (`major`, `minor`)."
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_1get_postgresql_version, 0, __pyx_n_s_get_postgresql_version, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_postgresql_version, __pyx_t_2) < 0) __PYX_ERR(1, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":247
 * 
 * 
 * def parse_sql(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its abstract syntax tree."
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_3parse_sql, 0, __pyx_n_s_parse_sql, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_sql, __pyx_t_2) < 0) __PYX_ERR(1, 247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":281
 * 
 * 
 * def parse_sql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_5parse_sql_json, 0, __pyx_n_s_parse_sql_json, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_sql_json, __pyx_t_2) < 0) __PYX_ERR(1, 281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":305
 * 
 * 
 * def parse_sql_protobuf(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``SQL`` `query` and return its ``protobuf`` encoded syntax tree."
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_7parse_sql_protobuf, 0, __pyx_n_s_parse_sql_protobuf, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_sql_protobuf, __pyx_t_2) < 0) __PYX_ERR(1, 305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":330
 * 
 * 
 * def parse_plpgsql_json(str query):             # <<<<<<<<<<<<<<
 *     "Parse the given ``pgpgsql`` `query` and return its ``JSON`` encoded syntax tree."
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_9parse_plpgsql_json, 0, __pyx_n_s_parse_plpgsql_json, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_plpgsql_json, __pyx_t_2) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":354
 * 
 * 
 * def fingerprint(str query):             # <<<<<<<<<<<<<<
 *     "Compute and return a *signature* of the given ``SQL`` `query`."
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_11fingerprint, 0, __pyx_n_s_fingerprint, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fingerprint, __pyx_t_2) < 0) __PYX_ERR(1, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":378
 * 
 * 
 * def split(str stmts, bint with_parser=True, bint only_slices=False):             # <<<<<<<<<<<<<<
 *     """Split the given `stmts` string into a sequence of the single ``SQL`` statements.
 * 
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_13split, 0, __pyx_n_s_split, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_split, __pyx_t_5) < 0) __PYX_ERR(1, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pglast/parser.pyx":431
 * 
 * 
 * def deparse_protobuf(bytes protobuf):             # <<<<<<<<<<<<<<
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_15deparse_protobuf, 0, __pyx_n_s_deparse_protobuf, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_deparse_protobuf, __pyx_t_5) < 0) __PYX_ERR(1, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pglast/parser.pyx":452
 * 
 * 
 * Token = namedtuple('Token', ('start', 'end', 'name', 'kind'))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Token, __pyx_t_3) < 0) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pglast/parser.pyx":455
 * 
 * 
 * def scan(str query):             # <<<<<<<<<<<<<<
 *     "Lexify the given ``SQL`` `query` and return a list of its lexical tokens."
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_17scan, 0, __pyx_n_s_scan, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scan, __pyx_t_3) < 0) __PYX_ERR(1, 455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_19__pyx_unpickle_Displacements, 0, __pyx_n_s_pyx_unpickle_Displacements, NULL, __pyx_n_s_pglast_parser, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Displacements, __pyx_t_3) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pglast/parser.pyx":1
 * # -*- coding: utf-8 -*-             # <<<<<<<<<<<<<<
 * # :Project:   pglast -- Cython interface with libpg_query
 * # :Created:   mer 02 ago 2017 15:12:49 CEST
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cpython/tuple.pxd":1
 * from .object cimport PyObject             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "Python.h":
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init pglast.parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pglast.parser");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#if _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]);
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
    Py_DECREF(argstuple);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
#ifdef __Pyx_CyFunction_USED
        if (__Pyx_IsCyOrPyCFunction(func))
#else
        if (PyCFunction_Check(func))
#endif
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
                return __Pyx_PyObject_CallMethO(func, NULL);
            }
        }
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (PyCFunction_Check(func))
        {
            if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
                return __Pyx_PyObject_CallMethO(func, args[0]);
            }
        }
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    #if CYTHON_VECTORCALL
    vectorcallfunc f = _PyVectorcall_Function(func);
    if (f) {
        return f(func, args, (size_t)nargs, kwargs);
    }
    #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
    if (__Pyx_CyFunction_CheckExact(func)) {
        __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
        if (f) return f(func, args, (size_t)nargs, kwargs);
    }
    #endif
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY ||  CYTHON_COMPILING_IN_LIMITED_API
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;  // error
            return kwvalues[i];
        }
    }
    return NULL;  // not found (no exception set)
}
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        if (kwds_is_tuple) {
            if (pos >= PyTuple_GET_SIZE(kwds)) break;
            key = PyTuple_GET_ITEM(kwds, pos);
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* unicode_iter */
static CYTHON_INLINE int __Pyx_init_unicode_iteration(
    PyObject* ustring, Py_ssize_t *length, void** data, int *kind) {
#if CYTHON_PEP393_ENABLED
    if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return -1;
    *kind   = PyUnicode_KIND(ustring);
    *length = PyUnicode_GET_LENGTH(ustring);
    *data   = PyUnicode_DATA(ustring);
#else
    *kind   = 0;
    *length = PyUnicode_GET_SIZE(ustring);
    *data   = (void*)PyUnicode_AS_UNICODE(ustring);
#endif
    return 0;
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kw,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
        if (unlikely(PyTuple_GET_SIZE(kw) == 0))
            return 1;
        if (!kw_allowed) {
            key = PyTuple_GET_ITEM(kw, 0);
            goto invalid_keyword;
        }
#if PY_VERSION_HEX < 0x03090000
        for (pos = 0; pos < PyTuple_GET_SIZE(kw); pos++) {
            key = PyTuple_GET_ITEM(kw, pos);
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
        }
#endif
        return 1;
    }
    while (PyDict_Next(kw, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if (!kw_allowed && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyString_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
#endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        tmp_tb = PyException_GetTraceback(tmp_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (unlikely(size == 0)) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                #if CYTHON_COMPILING_IN_LIMITED_API
                module = PyImport_ImportModuleLevelObject(
                    name, empty_dict, empty_dict, from_list, 1);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                #endif
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            #if CYTHON_COMPILING_IN_LIMITED_API
            module = PyImport_ImportModuleLevelObject(
                name, empty_dict, empty_dict, from_list, level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_kp_u_);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (!r) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    (void) spec;
    (void) type;
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg = NULL;
    return __Pyx_PyObject_FastCall(func, (&arg)+1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n = PyTuple_GET_SIZE(bases);
    for (i = 1; i < n; i++)
    {
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
            return -1;
        }
        if (dictoffset == 0 && b->tp_dictoffset)
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "extension type '%.200s' has no __dict__ slot, "
                "but base type '" __Pyx_FMT_TYPENAME "' has: "
                "either add 'cdef dict __dict__' to the extension type "
                "or add '__slots__ = [...]' to the base type",
                type_name, b_name);
            __Pyx_DECREF_TypeName(b_name);
            return -1;
        }
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetupReduce */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !CYTHON_COMPILING_IN_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
    size_bases = PyTuple_GET_SIZE(bases);
    for (i = 0; i < size_bases; i++) {
        base  = PyTuple_GET_ITEM(bases, i);
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                base = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base);
                Py_INCREF(base);
            }
        }
        j = PyList_GET_SIZE(new_bases);
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
    return result;
error:
    Py_XDECREF(new_bases);
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME);
    if (unlikely(!abi_module)) return NULL;
    Py_INCREF(abi_module);
    return abi_module;
}

/* FetchCommonType */
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    (void) module;
    cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    if (unlikely(op->func_doc == NULL)) {
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
        PyList_SET_ITEM(fromlist, 0, marker);
        module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    cf->m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#ifdef _Py_TPFLAGS_HAVE_VECTORCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    (void) module;
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyObjectCall2Args */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectLookupSpecial */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
#if PY_VERSION_HEX >= 0x03030000
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
#else
    CYTHON_MAYBE_UNUSED_VAR(qualname);
#endif
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *names_to_set, *key, *value, *set_name, *tmp;
    Py_ssize_t i = 0;
#if CYTHON_USE_TYPE_SLOTS
    names_to_set = PyDict_Copy(type->tp_dict);
#else
    {
        PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
        names_to_set = NULL;
        if (likely(d)) {
            PyObject *names_to_set = PyDict_New();
            int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
            Py_DECREF(d);
            if (unlikely(ret < 0))
                Py_CLEAR(names_to_set);
        }
    }
#endif
    if (unlikely(names_to_set == NULL))
        goto bad;
    while (PyDict_Next(names_to_set, &i, &key, &value)) {
        set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
        if (unlikely(set_name != NULL)) {
            tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
            Py_DECREF(set_name);
            if (unlikely(tmp == NULL)) {
                __Pyx_TypeName value_type_name =
                    __Pyx_PyType_GetName(Py_TYPE(value));
                __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
                PyErr_Format(PyExc_RuntimeError,
#if PY_MAJOR_VERSION >= 3
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name, key, type_name);
#else
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name,
                    PyString_Check(key) ? PyString_AS_STRING(key) : "?",
                    type_name);
#endif
                goto bad;
            } else {
                Py_DECREF(tmp);
            }
        }
        else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
    Py_DECREF(names_to_set);
    return 0;
bad:
    Py_XDECREF(names_to_set);
    return -1;
}
static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
#if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *mro = type->tp_mro;
    Py_ssize_t i, nbases;
    if (unlikely(!mro)) goto done;
    (void) &__Pyx_GetBuiltinName;
    Py_INCREF(mro);
    nbases = PyTuple_GET_SIZE(mro);
    assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
    for (i = 1; i < nbases-1; i++) {
        PyObject *base, *dict, *meth;
        base = PyTuple_GET_ITEM(mro, i);
        dict = ((PyTypeObject *)base)->tp_dict;
        meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
        if (unlikely(meth)) {
            descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
            PyObject *res;
            Py_INCREF(meth);
            if (likely(f)) {
                res = f(meth, NULL, type_obj);
                Py_DECREF(meth);
                if (unlikely(!res)) goto bad;
                meth = res;
            }
            res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
            Py_DECREF(meth);
            if (unlikely(!res)) goto bad;
            Py_DECREF(res);
            goto done;
        } else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
done:
    Py_XDECREF(mro);
    return type_obj;
bad:
    Py_XDECREF(mro);
    Py_DECREF(type_obj);
    return NULL;
#else
    PyObject *super_type, *super, *func, *res;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
#else
    super_type = (PyObject*) &PySuper_Type;
    (void) &__Pyx_GetBuiltinName;
#endif
    super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    Py_XDECREF(super_type);
#endif
    if (unlikely(!super)) {
        Py_CLEAR(type_obj);
        goto done;
    }
    func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
    Py_DECREF(super);
    if (likely(!func)) {
        if (unlikely(PyErr_Occurred()))
            Py_CLEAR(type_obj);
        goto done;
    }
    res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
    Py_DECREF(func);
    if (unlikely(!res))
        Py_CLEAR(type_obj);
    Py_XDECREF(res);
done:
    return type_obj;
#endif
}
#endif
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
#if PY_VERSION_HEX < 0x030600A4
        (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
#else
        mkw
#endif
    );
    Py_XDECREF(owned_metaclass);
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
    if (likely(result) && likely(PyType_Check(result))) {
        if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
            Py_CLEAR(result);
        } else {
            result = __Pyx_InitSubclassPEP487(result, mkw);
        }
    }
#else
    (void) &__Pyx_GetBuiltinName;
#endif
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    if (c_line) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    _PyTraceback_Add(funcname, filename, py_line);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

static PyObject* __pyx_convert__to_py_Node(Node s) {
  PyObject* res;
  PyObject* member;
  res = __Pyx_PyDict_NewPresized(1); if (unlikely(!res)) return NULL;
  member = __Pyx_PyInt_From_int(s.type); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_n_s_type, member) < 0)) goto bad;
  Py_DECREF(member);
  return res;
  bad:
  Py_XDECREF(member);
  Py_DECREF(res);
  return NULL;
}
/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(unsigned long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(unsigned long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned long, digit, digits[0])
                case 2:
                    if ((8 * sizeof(unsigned long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) >= 2 * PyLong_SHIFT)) {
                            return (unsigned long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) >= 3 * PyLong_SHIFT)) {
                            return (unsigned long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) >= 4 * PyLong_SHIFT)) {
                            return (unsigned long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (unsigned long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(unsigned long) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned long,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(unsigned long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned long) (((unsigned long)-1)*(((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(unsigned long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned long) ((((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned long) (((unsigned long)-1)*(((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned long) ((((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned long) (((unsigned long)-1)*(((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned long) ((((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(unsigned long) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(unsigned long) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            unsigned long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (unsigned long) -1;
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned long) -1;
        val = __Pyx_PyInt_As_unsigned_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned long");
    return (unsigned long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned long");
    return (unsigned long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(long) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(long) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(int) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(int) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CmdType(CmdType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CmdType neg_one = (CmdType) -1, const_zero = (CmdType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CmdType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CmdType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CmdType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CmdType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CmdType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(CmdType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_QuerySource(QuerySource value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const QuerySource neg_one = (QuerySource) -1, const_zero = (QuerySource) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(QuerySource) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(QuerySource) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(QuerySource) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(QuerySource) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(QuerySource) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(QuerySource),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_bool(bool value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const bool neg_one = (bool) -1, const_zero = (bool) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(bool) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(bool) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(bool) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(bool) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(bool) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(bool),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OverridingKind(OverridingKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const OverridingKind neg_one = (OverridingKind) -1, const_zero = (OverridingKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(OverridingKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(OverridingKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(OverridingKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(OverridingKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(OverridingKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(OverridingKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_LimitOption(LimitOption value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const LimitOption neg_one = (LimitOption) -1, const_zero = (LimitOption) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(LimitOption) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(LimitOption) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(LimitOption) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(LimitOption) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(LimitOption) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(LimitOption),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_A_Expr_Kind(A_Expr_Kind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const A_Expr_Kind neg_one = (A_Expr_Kind) -1, const_zero = (A_Expr_Kind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(A_Expr_Kind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(A_Expr_Kind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(A_Expr_Kind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(A_Expr_Kind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(A_Expr_Kind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(A_Expr_Kind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RoleSpecType(RoleSpecType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RoleSpecType neg_one = (RoleSpecType) -1, const_zero = (RoleSpecType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RoleSpecType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RoleSpecType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RoleSpecType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RoleSpecType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RoleSpecType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RoleSpecType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CoercionForm(CoercionForm value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CoercionForm neg_one = (CoercionForm) -1, const_zero = (CoercionForm) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CoercionForm) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CoercionForm) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CoercionForm) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CoercionForm) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CoercionForm) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(CoercionForm),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SortByDir(SortByDir value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SortByDir neg_one = (SortByDir) -1, const_zero = (SortByDir) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SortByDir) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SortByDir) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SortByDir) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SortByDir) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SortByDir) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SortByDir),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SortByNulls(SortByNulls value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SortByNulls neg_one = (SortByNulls) -1, const_zero = (SortByNulls) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SortByNulls) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SortByNulls) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SortByNulls) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SortByNulls) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SortByNulls) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SortByNulls),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DefElemAction(DefElemAction value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const DefElemAction neg_one = (DefElemAction) -1, const_zero = (DefElemAction) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(DefElemAction) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(DefElemAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(DefElemAction) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(DefElemAction) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(DefElemAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(DefElemAction),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_LockClauseStrength(LockClauseStrength value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const LockClauseStrength neg_one = (LockClauseStrength) -1, const_zero = (LockClauseStrength) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(LockClauseStrength) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(LockClauseStrength) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(LockClauseStrength) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(LockClauseStrength) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(LockClauseStrength) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(LockClauseStrength),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_LockWaitPolicy(LockWaitPolicy value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const LockWaitPolicy neg_one = (LockWaitPolicy) -1, const_zero = (LockWaitPolicy) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(LockWaitPolicy) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(LockWaitPolicy) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(LockWaitPolicy) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(LockWaitPolicy) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(LockWaitPolicy) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(LockWaitPolicy),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_XmlOptionType(XmlOptionType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const XmlOptionType neg_one = (XmlOptionType) -1, const_zero = (XmlOptionType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(XmlOptionType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(XmlOptionType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(XmlOptionType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(XmlOptionType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(XmlOptionType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(XmlOptionType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PartitionRangeDatumKind(PartitionRangeDatumKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PartitionRangeDatumKind neg_one = (PartitionRangeDatumKind) -1, const_zero = (PartitionRangeDatumKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PartitionRangeDatumKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PartitionRangeDatumKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PartitionRangeDatumKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PartitionRangeDatumKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PartitionRangeDatumKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PartitionRangeDatumKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RTEKind(RTEKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RTEKind neg_one = (RTEKind) -1, const_zero = (RTEKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RTEKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RTEKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RTEKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RTEKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RTEKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RTEKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_JoinType(JoinType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JoinType neg_one = (JoinType) -1, const_zero = (JoinType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JoinType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(JoinType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(JoinType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JoinType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(JoinType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(JoinType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_WCOKind(WCOKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const WCOKind neg_one = (WCOKind) -1, const_zero = (WCOKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(WCOKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(WCOKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(WCOKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(WCOKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(WCOKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(WCOKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_GroupingSetKind(GroupingSetKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const GroupingSetKind neg_one = (GroupingSetKind) -1, const_zero = (GroupingSetKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(GroupingSetKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(GroupingSetKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(GroupingSetKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(GroupingSetKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(GroupingSetKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(GroupingSetKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OnConflictAction(OnConflictAction value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const OnConflictAction neg_one = (OnConflictAction) -1, const_zero = (OnConflictAction) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(OnConflictAction) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(OnConflictAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(OnConflictAction) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(OnConflictAction) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(OnConflictAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(OnConflictAction),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CTEMaterialize(CTEMaterialize value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CTEMaterialize neg_one = (CTEMaterialize) -1, const_zero = (CTEMaterialize) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CTEMaterialize) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CTEMaterialize) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CTEMaterialize) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CTEMaterialize) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CTEMaterialize) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(CTEMaterialize),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SetOperation(SetOperation value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SetOperation neg_one = (SetOperation) -1, const_zero = (SetOperation) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SetOperation) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SetOperation) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SetOperation) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SetOperation) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SetOperation) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SetOperation),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ObjectType(ObjectType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ObjectType neg_one = (ObjectType) -1, const_zero = (ObjectType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ObjectType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ObjectType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ObjectType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ObjectType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ObjectType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(ObjectType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterTableType(AlterTableType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const AlterTableType neg_one = (AlterTableType) -1, const_zero = (AlterTableType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(AlterTableType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(AlterTableType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterTableType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(AlterTableType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterTableType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(AlterTableType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int16_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int16_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DropBehavior(DropBehavior value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const DropBehavior neg_one = (DropBehavior) -1, const_zero = (DropBehavior) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(DropBehavior) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(DropBehavior) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(DropBehavior) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(DropBehavior) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(DropBehavior) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(DropBehavior),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_GrantTargetType(GrantTargetType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const GrantTargetType neg_one = (GrantTargetType) -1, const_zero = (GrantTargetType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(GrantTargetType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(GrantTargetType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(GrantTargetType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(GrantTargetType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(GrantTargetType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(GrantTargetType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_VariableSetKind(VariableSetKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const VariableSetKind neg_one = (VariableSetKind) -1, const_zero = (VariableSetKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(VariableSetKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(VariableSetKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(VariableSetKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(VariableSetKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(VariableSetKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(VariableSetKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_OnCommitAction(OnCommitAction value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const OnCommitAction neg_one = (OnCommitAction) -1, const_zero = (OnCommitAction) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(OnCommitAction) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(OnCommitAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(OnCommitAction) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(OnCommitAction) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(OnCommitAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(OnCommitAction),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ConstrType(ConstrType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ConstrType neg_one = (ConstrType) -1, const_zero = (ConstrType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ConstrType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ConstrType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ConstrType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ConstrType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ConstrType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(ConstrType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ImportForeignSchemaType(ImportForeignSchemaType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ImportForeignSchemaType neg_one = (ImportForeignSchemaType) -1, const_zero = (ImportForeignSchemaType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ImportForeignSchemaType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ImportForeignSchemaType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ImportForeignSchemaType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ImportForeignSchemaType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ImportForeignSchemaType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(ImportForeignSchemaType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RoleStmtType(RoleStmtType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RoleStmtType neg_one = (RoleStmtType) -1, const_zero = (RoleStmtType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RoleStmtType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RoleStmtType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RoleStmtType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RoleStmtType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RoleStmtType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RoleStmtType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FetchDirection(FetchDirection value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const FetchDirection neg_one = (FetchDirection) -1, const_zero = (FetchDirection) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(FetchDirection) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(FetchDirection) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(FetchDirection) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(FetchDirection) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(FetchDirection) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(FetchDirection),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FunctionParameterMode(FunctionParameterMode value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const FunctionParameterMode neg_one = (FunctionParameterMode) -1, const_zero = (FunctionParameterMode) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(FunctionParameterMode) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(FunctionParameterMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(FunctionParameterMode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(FunctionParameterMode) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(FunctionParameterMode) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(FunctionParameterMode),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_TransactionStmtKind(TransactionStmtKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const TransactionStmtKind neg_one = (TransactionStmtKind) -1, const_zero = (TransactionStmtKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(TransactionStmtKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(TransactionStmtKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(TransactionStmtKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(TransactionStmtKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(TransactionStmtKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(TransactionStmtKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ViewCheckOption(ViewCheckOption value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ViewCheckOption neg_one = (ViewCheckOption) -1, const_zero = (ViewCheckOption) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ViewCheckOption) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ViewCheckOption) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ViewCheckOption) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ViewCheckOption) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ViewCheckOption) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(ViewCheckOption),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DiscardMode(DiscardMode value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const DiscardMode neg_one = (DiscardMode) -1, const_zero = (DiscardMode) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(DiscardMode) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(DiscardMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(DiscardMode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(DiscardMode) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(DiscardMode) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(DiscardMode),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ReindexObjectType(ReindexObjectType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ReindexObjectType neg_one = (ReindexObjectType) -1, const_zero = (ReindexObjectType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ReindexObjectType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ReindexObjectType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ReindexObjectType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ReindexObjectType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ReindexObjectType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(ReindexObjectType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CoercionContext(CoercionContext value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CoercionContext neg_one = (CoercionContext) -1, const_zero = (CoercionContext) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CoercionContext) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CoercionContext) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CoercionContext) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CoercionContext) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CoercionContext) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(CoercionContext),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterTSConfigType(AlterTSConfigType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const AlterTSConfigType neg_one = (AlterTSConfigType) -1, const_zero = (AlterTSConfigType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(AlterTSConfigType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(AlterTSConfigType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterTSConfigType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(AlterTSConfigType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterTSConfigType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(AlterTSConfigType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PublicationObjSpecType(PublicationObjSpecType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PublicationObjSpecType neg_one = (PublicationObjSpecType) -1, const_zero = (PublicationObjSpecType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PublicationObjSpecType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PublicationObjSpecType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PublicationObjSpecType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PublicationObjSpecType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PublicationObjSpecType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PublicationObjSpecType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterPublicationAction(AlterPublicationAction value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const AlterPublicationAction neg_one = (AlterPublicationAction) -1, const_zero = (AlterPublicationAction) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(AlterPublicationAction) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(AlterPublicationAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterPublicationAction) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(AlterPublicationAction) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterPublicationAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(AlterPublicationAction),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AlterSubscriptionType(AlterSubscriptionType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const AlterSubscriptionType neg_one = (AlterSubscriptionType) -1, const_zero = (AlterSubscriptionType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(AlterSubscriptionType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(AlterSubscriptionType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterSubscriptionType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(AlterSubscriptionType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AlterSubscriptionType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(AlterSubscriptionType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ParamKind(ParamKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ParamKind neg_one = (ParamKind) -1, const_zero = (ParamKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ParamKind) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ParamKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ParamKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ParamKind) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ParamKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(ParamKind),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_AggSplit(AggSplit value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const AggSplit neg_one = (AggSplit) -1, const_zero = (AggSplit) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(AggSplit) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(AggSplit) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AggSplit) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(AggSplit) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AggSplit) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(AggSplit),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BoolExprType(BoolExprType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const BoolExprType neg_one = (BoolExprType) -1, const_zero = (BoolExprType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(BoolExprType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BoolExprType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(BoolExprType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(BoolExprType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(BoolExprType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(BoolExprType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SubLinkType(SubLinkType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SubLinkType neg_one = (SubLinkType) -1, const_zero = (SubLinkType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SubLinkType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SubLinkType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SubLinkType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SubLinkType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SubLinkType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SubLinkType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RowCompareType(RowCompareType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const RowCompareType neg_one = (RowCompareType) -1, const_zero = (RowCompareType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(RowCompareType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(RowCompareType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RowCompareType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(RowCompareType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(RowCompareType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(RowCompareType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MinMaxOp(MinMaxOp value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const MinMaxOp neg_one = (MinMaxOp) -1, const_zero = (MinMaxOp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(MinMaxOp) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(MinMaxOp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MinMaxOp) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(MinMaxOp) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MinMaxOp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(MinMaxOp),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SQLValueFunctionOp(SQLValueFunctionOp value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SQLValueFunctionOp neg_one = (SQLValueFunctionOp) -1, const_zero = (SQLValueFunctionOp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SQLValueFunctionOp) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SQLValueFunctionOp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SQLValueFunctionOp) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SQLValueFunctionOp) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SQLValueFunctionOp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SQLValueFunctionOp),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_XmlExprOp(XmlExprOp value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const XmlExprOp neg_one = (XmlExprOp) -1, const_zero = (XmlExprOp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(XmlExprOp) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(XmlExprOp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(XmlExprOp) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(XmlExprOp) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(XmlExprOp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(XmlExprOp),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NullTestType(NullTestType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const NullTestType neg_one = (NullTestType) -1, const_zero = (NullTestType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(NullTestType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NullTestType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(NullTestType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(NullTestType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(NullTestType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(NullTestType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BoolTestType(BoolTestType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const BoolTestType neg_one = (BoolTestType) -1, const_zero = (BoolTestType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(BoolTestType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BoolTestType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(BoolTestType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(BoolTestType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(BoolTestType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(BoolTestType),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(size_t) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(size_t) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if ((sizeof(size_t) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if (CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XSETREF(name, __Pyx_NewRef(__pyx_n_s__32));
    }
    return name;
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compile time version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}
#endif

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#if _MSV_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
