/* Generated by Cython 3.2.8 */
#include "postgres.h"

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #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 < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_8"
#define CYTHON_HEX_VERSION 0x030208F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#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 PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#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_CPYTHON_FREETHREADING 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
  #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_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 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 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#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_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #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
  #if PY_VERSION_HEX < 0x03090000
    #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
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 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_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #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_CPYTHON_FREETHREADING 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_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
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 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 (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef 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
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #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
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 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
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(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
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || 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
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef 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
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #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(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #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 && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #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 Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

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

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#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))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#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 Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef 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
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#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))
#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_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #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_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#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 >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
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;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#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
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && 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 !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)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)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 __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #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))
#else
  #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_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, (Py_UCS4) 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
#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)
    #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_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif 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
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#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; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #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 "nodes/bitmapset.h"
#include "nodes/nodes.h"
#include "nodes/pg_list.h"
#include "nodes/value.h"
#include <stdint.h>
#include "nodes/parsenodes.h"
#include "nodes/primnodes.h"
#include <string.h>
#include <stdio.h>

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE PyObject *
    __Pyx_CAPI_PyList_GetItemRef(PyObject *list, Py_ssize_t index)
    {
        PyObject *item = PyList_GetItem(list, index);
        Py_XINCREF(item);
        return item;
    }
    #else
    #define __Pyx_CAPI_PyList_GetItemRef PyList_GetItemRef
    #endif

    #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Extend(PyObject *list, PyObject *iterable)
    {
        return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable);
    }

    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Clear(PyObject *list)
    {
        return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL);
    }
    #else
    #define __Pyx_CAPI_PyList_Extend PyList_Extend
    #define __Pyx_CAPI_PyList_Clear PyList_Clear
    #endif
    
#include <limits.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

#ifdef CYTHON_FREETHREADING_COMPATIBLE
#if CYTHON_FREETHREADING_COMPATIBLE
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
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 Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#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 CYTHON_ASSUME_SAFE_MACROS
    #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_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#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_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
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_Long(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_PyLong_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))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#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__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

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

static const char* const __pyx_f[] = {
  "pglast/parser.pyx",
  "pglast/ast.pyx",
  "<stringsource>",
  "env/lib/python3.14/site-packages/Cython/Includes/cpython/type.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

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

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

/* 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":68
 * 
 * # 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;
};
struct __pyx_ctuple_long__and_long;
typedef struct __pyx_ctuple_long__and_long __pyx_ctuple_long__and_long;
struct __pyx_ctuple_long__and_long {
  long f0;
  long f1;
};

/* "pglast/parser.pyx":201
 * 
 * 
 * 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;
  #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);\
          }
  #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 (used by PyObjectGetAttrStrNoError) */
#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 (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
#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 && PY_VERSION_HEX < 0x030C00A6
#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 (used by PyObjectGetAttrStrNoError) */
#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 (used by GetBuiltinName) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

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

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#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_XNewRef(__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)  do {\
    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_mstate_global->__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);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
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

/* PyObjectCall.proto (used by PyObjectFastCall) */
#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 (used by PyObjectFastCall) */
#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 * const*args, size_t nargs, PyObject *kwargs);

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

/* IncludeStringH.proto (used by decode_c_string) */
#include <string.h>

/* decode_c_string_utf16.proto (used by decode_c_string) */
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));

/* PyValueError_Check.proto */
#define __Pyx_PyExc_ValueError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ValueError)

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

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

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

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

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#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_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_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);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_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
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* py_dict_items.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* CallCFunction.proto (used by CallUnboundCMethod0) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

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

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

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

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

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

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

/* 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, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
    (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, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (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, int unsafe_shared);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (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, int unsafe_shared);
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, int unsafe_shared);

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

/* ArgTypeTestFunc.export */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

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

/* 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);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __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);

/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

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

/* divmod_int.proto */
static const __pyx_ctuple_long__and_long __Pyx_divmod_ERROR_VALUE_int_long = {-1, -1};
static CYTHON_INLINE __pyx_ctuple_long__and_long __Pyx_divmod_int_long(long a, long b);

/* 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 (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
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

/* decode_c_bytes.proto (used by decode_bytes) */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, 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));

/* decode_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
         PyObject* string, 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)) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyBytes_AS_STRING(string);
    size = PyBytes_GET_SIZE(string);
#else
    if (PyBytes_AsStringAndSize(string, &as_c_string, &size) < 0) {
        return NULL;
    }
#endif
    return __Pyx_decode_c_bytes(
        as_c_string, size,
        start, stop, encoding, errors, decode_func);
}

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* AllocateExtensionType.proto */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);

/* CallTypeTraverse.proto */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

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

/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
#endif

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

/* ValidateBasesTuple.proto (used by PyType_Ready) */
#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 */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* DelItemOnTypeDict.proto (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_8
#define __PYX_HAVE_RT_ImportType_proto_3_2_8
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_8(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_8(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_8 {
   __Pyx_ImportType_CheckSize_Error_3_2_8 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_8 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_8 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_8(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_8 check_size);
#endif

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

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

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

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

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

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

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

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

/* CythonFunctionShared.proto (used by CythonFunction) */
#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 || CYTHON_COMPILING_IN_LIMITED_API
  #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 CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
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 PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
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_COMPILING_IN_LIMITED_API
#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 < 0x030d0000
#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 (used by Py3ClassCreate) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
#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 (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

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

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

/* CheckUnpickleChecksum.proto */
static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members);

static PyObject* __pyx_convert__to_py_Node(Node s);
/* UnicodeAsUCS4.proto */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);

/* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

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

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

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

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

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

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ParseLoc(ParseLoc value);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MergeMatchKind(MergeMatchKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ReturningOptionKind(ReturningOptionKind value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonExprOp(JsonExprOp value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonWrapper(JsonWrapper value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonQuotes(JsonQuotes value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonTableColumnType(JsonTableColumnType value);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_TableFuncType(TableFuncType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_VarReturningType(VarReturningType value);

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CompareType(CompareType value);

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonFormatType(JsonFormatType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonEncoding(JsonEncoding value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonConstructorType(JsonConstructorType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonValueType(JsonValueType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonBehaviorType(JsonBehaviorType value);

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

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

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

/* ObjectAsUCS4.proto */
static Py_UCS4 __Pyx__PyObject_AsPy_UCS4(PyObject*);
static CYTHON_INLINE Py_UCS4 __Pyx_PyObject_AsPy_UCS4(PyObject *x) {
    return (likely(PyUnicode_Check(x)) ? __Pyx_PyUnicode_AsPy_UCS4(x) : __Pyx__PyObject_AsPy_UCS4(x));
}

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* UpdateUnpickledDict.proto */
static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(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)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."


/* Module declarations from "pglast" */

/* Module declarations from "libc.stdint" */

/* Module declarations from "pglast.structs" */

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

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

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

/* Module declarations from "cpython" */

/* Module declarations from "cpython.object" */

/* Module declarations from "cpython.bytes" */

/* Module declarations from "cpython.list" */

/* Module declarations from "libc" */

/* Module declarations from "libc.limits" */

/* Module declarations from "cpython.ref" */

/* Module declarations from "cpython.tuple" */

/* Module declarations from "pglast.parser" */
static PyObject *__pyx_f_6pglast_6parser__pg_bitmapset_to_set(Bitmapset 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_RTEPermissionInfo(RTEPermissionInfo *, 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_ReturningOption(ReturningOption *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ReturningClause(ReturningClause *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_TriggerTransition(TriggerTransition *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonOutput(JsonOutput *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonArgument(JsonArgument *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonFuncExpr(JsonFuncExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonTablePathSpec(JsonTablePathSpec *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonTable(JsonTable *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonTableColumn(JsonTableColumn *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonKeyValue(JsonKeyValue *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonParseExpr(JsonParseExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonScalarExpr(JsonScalarExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonSerializeExpr(JsonSerializeExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonObjectConstructor(JsonObjectConstructor *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonArrayConstructor(JsonArrayConstructor *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonArrayQueryConstructor(JsonArrayQueryConstructor *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonAggConstructor(JsonAggConstructor *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonObjectAgg(JsonObjectAgg *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonArrayAgg(JsonArrayAgg *, 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_AlterTableCmd(AlterTableCmd *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ATAlterConstraint(ATAlterConstraint *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_ReplicaIdentityStmt(ReplicaIdentityStmt *, 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_WindowFuncRunCondition(WindowFuncRunCondition *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_MergeSupportFunc(MergeSupportFunc *, 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_JsonFormat(JsonFormat *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonReturning(JsonReturning *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonValueExpr(JsonValueExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonConstructorExpr(JsonConstructorExpr *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonIsPredicate(JsonIsPredicate *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonBehavior(JsonBehavior *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pglast_6parser_create_JsonExpr(JsonExpr *, 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_MergeAction(MergeAction *, 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_ReturningExpr(ReturningExpr *, 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_reversed;
/* #### Code section: string_decls ### */
static const char __pyx_k_displacements_max_offset[] = "displacements, max_offset";
/* #### 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_14comments(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_16deparse_protobuf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_protobuf, int __pyx_v_pretty_print, int __pyx_v_indent_size, int __pyx_v_max_line_length, int __pyx_v_trailing_newline, int __pyx_v_commas_start_of_line); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_18scan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query); /* proto */
static PyObject *__pyx_pf_6pglast_6parser_20__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*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#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

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyObject *__pyx_type_6pglast_6parser_Displacements;
  PyTypeObject *__pyx_ptype_6pglast_6parser_Displacements;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type__lstrip;
  __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type__rstrip;
  __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type__strip;
  PyObject *__pyx_tuple[4];
  PyObject *__pyx_codeobj_tab[15];
  PyObject *__pyx_string_tab[481];
  PyObject *__pyx_number_tab[2];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;

/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

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

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_Exception_representing_the_error __pyx_string_tab[0]
#define __pyx_kp_u_Exception_representing_the_error_2 __pyx_string_tab[1]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[2]
#define __pyx_kp_u_Unhandled_tag_s __pyx_string_tab[3]
#define __pyx_kp_u__2 __pyx_string_tab[4]
#define __pyx_kp_u__3 __pyx_string_tab[5]
#define __pyx_kp_u_add_note __pyx_string_tab[6]
#define __pyx_kp_u_at_index __pyx_string_tab[7]
#define __pyx_kp_u_at_position __pyx_string_tab[8]
#define __pyx_kp_u_disable __pyx_string_tab[9]
#define __pyx_kp_u_enable __pyx_string_tab[10]
#define __pyx_kp_u_gc __pyx_string_tab[11]
#define __pyx_kp_u_isenabled __pyx_string_tab[12]
#define __pyx_kp_u_pglast __pyx_string_tab[13]
#define __pyx_kp_u_pglast_parser_pyx __pyx_string_tab[14]
#define __pyx_kp_u_stringsource __pyx_string_tab[15]
#define __pyx_n_u_ __pyx_string_tab[16]
#define __pyx_n_u_ATAlterConstraint __pyx_string_tab[17]
#define __pyx_n_u_A_ArrayExpr __pyx_string_tab[18]
#define __pyx_n_u_A_Const __pyx_string_tab[19]
#define __pyx_n_u_A_Expr __pyx_string_tab[20]
#define __pyx_n_u_A_Expr_Kind __pyx_string_tab[21]
#define __pyx_n_u_A_Indices __pyx_string_tab[22]
#define __pyx_n_u_A_Indirection __pyx_string_tab[23]
#define __pyx_n_u_A_Star __pyx_string_tab[24]
#define __pyx_n_u_AccessPriv __pyx_string_tab[25]
#define __pyx_n_u_AggSplit __pyx_string_tab[26]
#define __pyx_n_u_Aggref __pyx_string_tab[27]
#define __pyx_n_u_Alias __pyx_string_tab[28]
#define __pyx_n_u_AlterCollationStmt __pyx_string_tab[29]
#define __pyx_n_u_AlterDatabaseRefreshCollStmt __pyx_string_tab[30]
#define __pyx_n_u_AlterDatabaseSetStmt __pyx_string_tab[31]
#define __pyx_n_u_AlterDatabaseStmt __pyx_string_tab[32]
#define __pyx_n_u_AlterDefaultPrivilegesStmt __pyx_string_tab[33]
#define __pyx_n_u_AlterDomainStmt __pyx_string_tab[34]
#define __pyx_n_u_AlterEnumStmt __pyx_string_tab[35]
#define __pyx_n_u_AlterEventTrigStmt __pyx_string_tab[36]
#define __pyx_n_u_AlterExtensionContentsStmt __pyx_string_tab[37]
#define __pyx_n_u_AlterExtensionStmt __pyx_string_tab[38]
#define __pyx_n_u_AlterFdwStmt __pyx_string_tab[39]
#define __pyx_n_u_AlterForeignServerStmt __pyx_string_tab[40]
#define __pyx_n_u_AlterFunctionStmt __pyx_string_tab[41]
#define __pyx_n_u_AlterObjectDependsStmt __pyx_string_tab[42]
#define __pyx_n_u_AlterObjectSchemaStmt __pyx_string_tab[43]
#define __pyx_n_u_AlterOpFamilyStmt __pyx_string_tab[44]
#define __pyx_n_u_AlterOperatorStmt __pyx_string_tab[45]
#define __pyx_n_u_AlterOwnerStmt __pyx_string_tab[46]
#define __pyx_n_u_AlterPolicyStmt __pyx_string_tab[47]
#define __pyx_n_u_AlterPublicationAction __pyx_string_tab[48]
#define __pyx_n_u_AlterPublicationStmt __pyx_string_tab[49]
#define __pyx_n_u_AlterRoleSetStmt __pyx_string_tab[50]
#define __pyx_n_u_AlterRoleStmt __pyx_string_tab[51]
#define __pyx_n_u_AlterSeqStmt __pyx_string_tab[52]
#define __pyx_n_u_AlterStatsStmt __pyx_string_tab[53]
#define __pyx_n_u_AlterSubscriptionStmt __pyx_string_tab[54]
#define __pyx_n_u_AlterSubscriptionType __pyx_string_tab[55]
#define __pyx_n_u_AlterSystemStmt __pyx_string_tab[56]
#define __pyx_n_u_AlterTSConfigType __pyx_string_tab[57]
#define __pyx_n_u_AlterTSConfigurationStmt __pyx_string_tab[58]
#define __pyx_n_u_AlterTSDictionaryStmt __pyx_string_tab[59]
#define __pyx_n_u_AlterTableCmd __pyx_string_tab[60]
#define __pyx_n_u_AlterTableMoveAllStmt __pyx_string_tab[61]
#define __pyx_n_u_AlterTableSpaceOptionsStmt __pyx_string_tab[62]
#define __pyx_n_u_AlterTableStmt __pyx_string_tab[63]
#define __pyx_n_u_AlterTableType __pyx_string_tab[64]
#define __pyx_n_u_AlterTypeStmt __pyx_string_tab[65]
#define __pyx_n_u_AlterUserMappingStmt __pyx_string_tab[66]
#define __pyx_n_u_AlternativeSubPlan __pyx_string_tab[67]
#define __pyx_n_u_ArrayCoerceExpr __pyx_string_tab[68]
#define __pyx_n_u_ArrayExpr __pyx_string_tab[69]
#define __pyx_n_u_BitString __pyx_string_tab[70]
#define __pyx_n_u_BoolExpr __pyx_string_tab[71]
#define __pyx_n_u_BoolExprType __pyx_string_tab[72]
#define __pyx_n_u_BoolTestType __pyx_string_tab[73]
#define __pyx_n_u_Boolean __pyx_string_tab[74]
#define __pyx_n_u_BooleanTest __pyx_string_tab[75]
#define __pyx_n_u_CTECycleClause __pyx_string_tab[76]
#define __pyx_n_u_CTEMaterialize __pyx_string_tab[77]
#define __pyx_n_u_CTESearchClause __pyx_string_tab[78]
#define __pyx_n_u_CallContext __pyx_string_tab[79]
#define __pyx_n_u_CallStmt __pyx_string_tab[80]
#define __pyx_n_u_CaseExpr __pyx_string_tab[81]
#define __pyx_n_u_CaseTestExpr __pyx_string_tab[82]
#define __pyx_n_u_CaseWhen __pyx_string_tab[83]
#define __pyx_n_u_CheckPointStmt __pyx_string_tab[84]
#define __pyx_n_u_ClosePortalStmt __pyx_string_tab[85]
#define __pyx_n_u_ClusterStmt __pyx_string_tab[86]
#define __pyx_n_u_CmdType __pyx_string_tab[87]
#define __pyx_n_u_CoalesceExpr __pyx_string_tab[88]
#define __pyx_n_u_CoerceToDomain __pyx_string_tab[89]
#define __pyx_n_u_CoerceToDomainValue __pyx_string_tab[90]
#define __pyx_n_u_CoerceViaIO __pyx_string_tab[91]
#define __pyx_n_u_CoercionContext __pyx_string_tab[92]
#define __pyx_n_u_CoercionForm __pyx_string_tab[93]
#define __pyx_n_u_CollateClause __pyx_string_tab[94]
#define __pyx_n_u_CollateExpr __pyx_string_tab[95]
#define __pyx_n_u_ColumnDef __pyx_string_tab[96]
#define __pyx_n_u_ColumnRef __pyx_string_tab[97]
#define __pyx_n_u_Comment __pyx_string_tab[98]
#define __pyx_n_u_CommentStmt __pyx_string_tab[99]
#define __pyx_n_u_CommonTableExpr __pyx_string_tab[100]
#define __pyx_n_u_CompareType __pyx_string_tab[101]
#define __pyx_n_u_CompositeTypeStmt __pyx_string_tab[102]
#define __pyx_n_u_ConstrType __pyx_string_tab[103]
#define __pyx_n_u_Constraint __pyx_string_tab[104]
#define __pyx_n_u_ConstraintsSetStmt __pyx_string_tab[105]
#define __pyx_n_u_ConvertRowtypeExpr __pyx_string_tab[106]
#define __pyx_n_u_CopyStmt __pyx_string_tab[107]
#define __pyx_n_u_CreateAmStmt __pyx_string_tab[108]
#define __pyx_n_u_CreateCastStmt __pyx_string_tab[109]
#define __pyx_n_u_CreateConversionStmt __pyx_string_tab[110]
#define __pyx_n_u_CreateDomainStmt __pyx_string_tab[111]
#define __pyx_n_u_CreateEnumStmt __pyx_string_tab[112]
#define __pyx_n_u_CreateEventTrigStmt __pyx_string_tab[113]
#define __pyx_n_u_CreateExtensionStmt __pyx_string_tab[114]
#define __pyx_n_u_CreateFdwStmt __pyx_string_tab[115]
#define __pyx_n_u_CreateForeignServerStmt __pyx_string_tab[116]
#define __pyx_n_u_CreateForeignTableStmt __pyx_string_tab[117]
#define __pyx_n_u_CreateFunctionStmt __pyx_string_tab[118]
#define __pyx_n_u_CreateOpClassItem __pyx_string_tab[119]
#define __pyx_n_u_CreateOpClassStmt __pyx_string_tab[120]
#define __pyx_n_u_CreateOpFamilyStmt __pyx_string_tab[121]
#define __pyx_n_u_CreatePLangStmt __pyx_string_tab[122]
#define __pyx_n_u_CreatePolicyStmt __pyx_string_tab[123]
#define __pyx_n_u_CreatePublicationStmt __pyx_string_tab[124]
#define __pyx_n_u_CreateRangeStmt __pyx_string_tab[125]
#define __pyx_n_u_CreateRoleStmt __pyx_string_tab[126]
#define __pyx_n_u_CreateSchemaStmt __pyx_string_tab[127]
#define __pyx_n_u_CreateSeqStmt __pyx_string_tab[128]
#define __pyx_n_u_CreateStatsStmt __pyx_string_tab[129]
#define __pyx_n_u_CreateStmt __pyx_string_tab[130]
#define __pyx_n_u_CreateSubscriptionStmt __pyx_string_tab[131]
#define __pyx_n_u_CreateTableAsStmt __pyx_string_tab[132]
#define __pyx_n_u_CreateTableSpaceStmt __pyx_string_tab[133]
#define __pyx_n_u_CreateTransformStmt __pyx_string_tab[134]
#define __pyx_n_u_CreateTrigStmt __pyx_string_tab[135]
#define __pyx_n_u_CreateUserMappingStmt __pyx_string_tab[136]
#define __pyx_n_u_CreatedbStmt __pyx_string_tab[137]
#define __pyx_n_u_CurrentOfExpr __pyx_string_tab[138]
#define __pyx_n_u_DeallocateStmt __pyx_string_tab[139]
#define __pyx_n_u_DeclareCursorStmt __pyx_string_tab[140]
#define __pyx_n_u_DefElem __pyx_string_tab[141]
#define __pyx_n_u_DefElemAction __pyx_string_tab[142]
#define __pyx_n_u_DefineStmt __pyx_string_tab[143]
#define __pyx_n_u_DeleteStmt __pyx_string_tab[144]
#define __pyx_n_u_DeparseError __pyx_string_tab[145]
#define __pyx_n_u_DeparseError___str __pyx_string_tab[146]
#define __pyx_n_u_DiscardMode __pyx_string_tab[147]
#define __pyx_n_u_DiscardStmt __pyx_string_tab[148]
#define __pyx_n_u_Displacements __pyx_string_tab[149]
#define __pyx_n_u_Displacements___reduce_cython __pyx_string_tab[150]
#define __pyx_n_u_Displacements___setstate_cython __pyx_string_tab[151]
#define __pyx_n_u_DoStmt __pyx_string_tab[152]
#define __pyx_n_u_DropBehavior __pyx_string_tab[153]
#define __pyx_n_u_DropOwnedStmt __pyx_string_tab[154]
#define __pyx_n_u_DropRoleStmt __pyx_string_tab[155]
#define __pyx_n_u_DropStmt __pyx_string_tab[156]
#define __pyx_n_u_DropSubscriptionStmt __pyx_string_tab[157]
#define __pyx_n_u_DropTableSpaceStmt __pyx_string_tab[158]
#define __pyx_n_u_DropUserMappingStmt __pyx_string_tab[159]
#define __pyx_n_u_DropdbStmt __pyx_string_tab[160]
#define __pyx_n_u_Error __pyx_string_tab[161]
#define __pyx_n_u_ExecuteStmt __pyx_string_tab[162]
#define __pyx_n_u_ExplainStmt __pyx_string_tab[163]
#define __pyx_n_u_FetchDirection __pyx_string_tab[164]
#define __pyx_n_u_FetchStmt __pyx_string_tab[165]
#define __pyx_n_u_FieldSelect __pyx_string_tab[166]
#define __pyx_n_u_FieldStore __pyx_string_tab[167]
#define __pyx_n_u_Float __pyx_string_tab[168]
#define __pyx_n_u_FromExpr __pyx_string_tab[169]
#define __pyx_n_u_FuncCall __pyx_string_tab[170]
#define __pyx_n_u_FuncExpr __pyx_string_tab[171]
#define __pyx_n_u_FunctionParameter __pyx_string_tab[172]
#define __pyx_n_u_FunctionParameterMode __pyx_string_tab[173]
#define __pyx_n_u_GrantRoleStmt __pyx_string_tab[174]
#define __pyx_n_u_GrantStmt __pyx_string_tab[175]
#define __pyx_n_u_GrantTargetType __pyx_string_tab[176]
#define __pyx_n_u_GroupingFunc __pyx_string_tab[177]
#define __pyx_n_u_GroupingSet __pyx_string_tab[178]
#define __pyx_n_u_GroupingSetKind __pyx_string_tab[179]
#define __pyx_n_u_ImportForeignSchemaStmt __pyx_string_tab[180]
#define __pyx_n_u_ImportForeignSchemaType __pyx_string_tab[181]
#define __pyx_n_u_IndexElem __pyx_string_tab[182]
#define __pyx_n_u_IndexStmt __pyx_string_tab[183]
#define __pyx_n_u_InferClause __pyx_string_tab[184]
#define __pyx_n_u_InferenceElem __pyx_string_tab[185]
#define __pyx_n_u_InlineCodeBlock __pyx_string_tab[186]
#define __pyx_n_u_InsertStmt __pyx_string_tab[187]
#define __pyx_n_u_Integer __pyx_string_tab[188]
#define __pyx_n_u_IntoClause __pyx_string_tab[189]
#define __pyx_n_u_JoinExpr __pyx_string_tab[190]
#define __pyx_n_u_JoinType __pyx_string_tab[191]
#define __pyx_n_u_JsonAggConstructor __pyx_string_tab[192]
#define __pyx_n_u_JsonArgument __pyx_string_tab[193]
#define __pyx_n_u_JsonArrayAgg __pyx_string_tab[194]
#define __pyx_n_u_JsonArrayConstructor __pyx_string_tab[195]
#define __pyx_n_u_JsonArrayQueryConstructor __pyx_string_tab[196]
#define __pyx_n_u_JsonBehavior __pyx_string_tab[197]
#define __pyx_n_u_JsonBehaviorType __pyx_string_tab[198]
#define __pyx_n_u_JsonConstructorExpr __pyx_string_tab[199]
#define __pyx_n_u_JsonConstructorType __pyx_string_tab[200]
#define __pyx_n_u_JsonEncoding __pyx_string_tab[201]
#define __pyx_n_u_JsonExpr __pyx_string_tab[202]
#define __pyx_n_u_JsonExprOp __pyx_string_tab[203]
#define __pyx_n_u_JsonFormat __pyx_string_tab[204]
#define __pyx_n_u_JsonFormatType __pyx_string_tab[205]
#define __pyx_n_u_JsonFuncExpr __pyx_string_tab[206]
#define __pyx_n_u_JsonIsPredicate __pyx_string_tab[207]
#define __pyx_n_u_JsonKeyValue __pyx_string_tab[208]
#define __pyx_n_u_JsonObjectAgg __pyx_string_tab[209]
#define __pyx_n_u_JsonObjectConstructor __pyx_string_tab[210]
#define __pyx_n_u_JsonOutput __pyx_string_tab[211]
#define __pyx_n_u_JsonParseExpr __pyx_string_tab[212]
#define __pyx_n_u_JsonQuotes __pyx_string_tab[213]
#define __pyx_n_u_JsonReturning __pyx_string_tab[214]
#define __pyx_n_u_JsonScalarExpr __pyx_string_tab[215]
#define __pyx_n_u_JsonSerializeExpr __pyx_string_tab[216]
#define __pyx_n_u_JsonTable __pyx_string_tab[217]
#define __pyx_n_u_JsonTableColumn __pyx_string_tab[218]
#define __pyx_n_u_JsonTableColumnType __pyx_string_tab[219]
#define __pyx_n_u_JsonTablePathSpec __pyx_string_tab[220]
#define __pyx_n_u_JsonValueExpr __pyx_string_tab[221]
#define __pyx_n_u_JsonValueType __pyx_string_tab[222]
#define __pyx_n_u_JsonWrapper __pyx_string_tab[223]
#define __pyx_n_u_LONG_MAX __pyx_string_tab[224]
#define __pyx_n_u_LimitOption __pyx_string_tab[225]
#define __pyx_n_u_ListenStmt __pyx_string_tab[226]
#define __pyx_n_u_LoadStmt __pyx_string_tab[227]
#define __pyx_n_u_LockClauseStrength __pyx_string_tab[228]
#define __pyx_n_u_LockStmt __pyx_string_tab[229]
#define __pyx_n_u_LockWaitPolicy __pyx_string_tab[230]
#define __pyx_n_u_LockingClause __pyx_string_tab[231]
#define __pyx_n_u_MergeAction __pyx_string_tab[232]
#define __pyx_n_u_MergeMatchKind __pyx_string_tab[233]
#define __pyx_n_u_MergeStmt __pyx_string_tab[234]
#define __pyx_n_u_MergeSupportFunc __pyx_string_tab[235]
#define __pyx_n_u_MergeWhenClause __pyx_string_tab[236]
#define __pyx_n_u_MinMaxExpr __pyx_string_tab[237]
#define __pyx_n_u_MinMaxOp __pyx_string_tab[238]
#define __pyx_n_u_MultiAssignRef __pyx_string_tab[239]
#define __pyx_n_u_NamedArgExpr __pyx_string_tab[240]
#define __pyx_n_u_NotifyStmt __pyx_string_tab[241]
#define __pyx_n_u_NullTest __pyx_string_tab[242]
#define __pyx_n_u_NullTestType __pyx_string_tab[243]
#define __pyx_n_u_ObjectType __pyx_string_tab[244]
#define __pyx_n_u_ObjectWithArgs __pyx_string_tab[245]
#define __pyx_n_u_OnCommitAction __pyx_string_tab[246]
#define __pyx_n_u_OnConflictAction __pyx_string_tab[247]
#define __pyx_n_u_OnConflictClause __pyx_string_tab[248]
#define __pyx_n_u_OnConflictExpr __pyx_string_tab[249]
#define __pyx_n_u_OpExpr __pyx_string_tab[250]
#define __pyx_n_u_OverridingKind __pyx_string_tab[251]
#define __pyx_n_u_PLAssignStmt __pyx_string_tab[252]
#define __pyx_n_u_Param __pyx_string_tab[253]
#define __pyx_n_u_ParamKind __pyx_string_tab[254]
#define __pyx_n_u_ParamRef __pyx_string_tab[255]
#define __pyx_n_u_ParseError __pyx_string_tab[256]
#define __pyx_n_u_ParseError___str __pyx_string_tab[257]
#define __pyx_n_u_PartitionBoundSpec __pyx_string_tab[258]
#define __pyx_n_u_PartitionCmd __pyx_string_tab[259]
#define __pyx_n_u_PartitionElem __pyx_string_tab[260]
#define __pyx_n_u_PartitionRangeDatum __pyx_string_tab[261]
#define __pyx_n_u_PartitionRangeDatumKind __pyx_string_tab[262]
#define __pyx_n_u_PartitionSpec __pyx_string_tab[263]
#define __pyx_n_u_PartitionStrategy __pyx_string_tab[264]
#define __pyx_n_u_PrepareStmt __pyx_string_tab[265]
#define __pyx_n_u_PublicationObjSpec __pyx_string_tab[266]
#define __pyx_n_u_PublicationObjSpecType __pyx_string_tab[267]
#define __pyx_n_u_PublicationTable __pyx_string_tab[268]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[269]
#define __pyx_n_u_Query __pyx_string_tab[270]
#define __pyx_n_u_QuerySource __pyx_string_tab[271]
#define __pyx_n_u_RTEKind __pyx_string_tab[272]
#define __pyx_n_u_RTEPermissionInfo __pyx_string_tab[273]
#define __pyx_n_u_RangeFunction __pyx_string_tab[274]
#define __pyx_n_u_RangeSubselect __pyx_string_tab[275]
#define __pyx_n_u_RangeTableFunc __pyx_string_tab[276]
#define __pyx_n_u_RangeTableFuncCol __pyx_string_tab[277]
#define __pyx_n_u_RangeTableSample __pyx_string_tab[278]
#define __pyx_n_u_RangeTblEntry __pyx_string_tab[279]
#define __pyx_n_u_RangeTblFunction __pyx_string_tab[280]
#define __pyx_n_u_RangeTblRef __pyx_string_tab[281]
#define __pyx_n_u_RangeVar __pyx_string_tab[282]
#define __pyx_n_u_RawStmt __pyx_string_tab[283]
#define __pyx_n_u_ReassignOwnedStmt __pyx_string_tab[284]
#define __pyx_n_u_RefreshMatViewStmt __pyx_string_tab[285]
#define __pyx_n_u_ReindexObjectType __pyx_string_tab[286]
#define __pyx_n_u_ReindexStmt __pyx_string_tab[287]
#define __pyx_n_u_RelabelType __pyx_string_tab[288]
#define __pyx_n_u_RenameStmt __pyx_string_tab[289]
#define __pyx_n_u_ReplicaIdentityStmt __pyx_string_tab[290]
#define __pyx_n_u_ResTarget __pyx_string_tab[291]
#define __pyx_n_u_ReturnStmt __pyx_string_tab[292]
#define __pyx_n_u_ReturningClause __pyx_string_tab[293]
#define __pyx_n_u_ReturningExpr __pyx_string_tab[294]
#define __pyx_n_u_ReturningOption __pyx_string_tab[295]
#define __pyx_n_u_ReturningOptionKind __pyx_string_tab[296]
#define __pyx_n_u_RoleSpec __pyx_string_tab[297]
#define __pyx_n_u_RoleSpecType __pyx_string_tab[298]
#define __pyx_n_u_RoleStmtType __pyx_string_tab[299]
#define __pyx_n_u_RowCompareExpr __pyx_string_tab[300]
#define __pyx_n_u_RowExpr __pyx_string_tab[301]
#define __pyx_n_u_RowMarkClause __pyx_string_tab[302]
#define __pyx_n_u_RuleStmt __pyx_string_tab[303]
#define __pyx_n_u_SQLValueFunction __pyx_string_tab[304]
#define __pyx_n_u_SQLValueFunctionOp __pyx_string_tab[305]
#define __pyx_n_u_ScalarArrayOpExpr __pyx_string_tab[306]
#define __pyx_n_u_SecLabelStmt __pyx_string_tab[307]
#define __pyx_n_u_SelectStmt __pyx_string_tab[308]
#define __pyx_n_u_SetOperation __pyx_string_tab[309]
#define __pyx_n_u_SetOperationStmt __pyx_string_tab[310]
#define __pyx_n_u_SetToDefault __pyx_string_tab[311]
#define __pyx_n_u_SortBy __pyx_string_tab[312]
#define __pyx_n_u_SortByDir __pyx_string_tab[313]
#define __pyx_n_u_SortByNulls __pyx_string_tab[314]
#define __pyx_n_u_SortGroupClause __pyx_string_tab[315]
#define __pyx_n_u_StatsElem __pyx_string_tab[316]
#define __pyx_n_u_String __pyx_string_tab[317]
#define __pyx_n_u_SubLink __pyx_string_tab[318]
#define __pyx_n_u_SubLinkType __pyx_string_tab[319]
#define __pyx_n_u_SubPlan __pyx_string_tab[320]
#define __pyx_n_u_SubscriptingRef __pyx_string_tab[321]
#define __pyx_n_u_TableFunc __pyx_string_tab[322]
#define __pyx_n_u_TableFuncType __pyx_string_tab[323]
#define __pyx_n_u_TableLikeClause __pyx_string_tab[324]
#define __pyx_n_u_TableSampleClause __pyx_string_tab[325]
#define __pyx_n_u_TargetEntry __pyx_string_tab[326]
#define __pyx_n_u_Token __pyx_string_tab[327]
#define __pyx_n_u_TransactionStmt __pyx_string_tab[328]
#define __pyx_n_u_TransactionStmtKind __pyx_string_tab[329]
#define __pyx_n_u_TriggerTransition __pyx_string_tab[330]
#define __pyx_n_u_TruncateStmt __pyx_string_tab[331]
#define __pyx_n_u_TypeCast __pyx_string_tab[332]
#define __pyx_n_u_TypeName __pyx_string_tab[333]
#define __pyx_n_u_UNKNOWN __pyx_string_tab[334]
#define __pyx_n_u_UnlistenStmt __pyx_string_tab[335]
#define __pyx_n_u_UpdateStmt __pyx_string_tab[336]
#define __pyx_n_u_VacuumRelation __pyx_string_tab[337]
#define __pyx_n_u_VacuumStmt __pyx_string_tab[338]
#define __pyx_n_u_Var __pyx_string_tab[339]
#define __pyx_n_u_VarReturningType __pyx_string_tab[340]
#define __pyx_n_u_VariableSetKind __pyx_string_tab[341]
#define __pyx_n_u_VariableSetStmt __pyx_string_tab[342]
#define __pyx_n_u_VariableShowStmt __pyx_string_tab[343]
#define __pyx_n_u_ViewCheckOption __pyx_string_tab[344]
#define __pyx_n_u_ViewStmt __pyx_string_tab[345]
#define __pyx_n_u_WCOKind __pyx_string_tab[346]
#define __pyx_n_u_WindowClause __pyx_string_tab[347]
#define __pyx_n_u_WindowDef __pyx_string_tab[348]
#define __pyx_n_u_WindowFunc __pyx_string_tab[349]
#define __pyx_n_u_WindowFuncRunCondition __pyx_string_tab[350]
#define __pyx_n_u_WithCheckOption __pyx_string_tab[351]
#define __pyx_n_u_WithClause __pyx_string_tab[352]
#define __pyx_n_u_XmlExpr __pyx_string_tab[353]
#define __pyx_n_u_XmlExprOp __pyx_string_tab[354]
#define __pyx_n_u_XmlOptionType __pyx_string_tab[355]
#define __pyx_n_u_XmlSerialize __pyx_string_tab[356]
#define __pyx_n_u_annotate __pyx_string_tab[357]
#define __pyx_n_u_args __pyx_string_tab[358]
#define __pyx_n_u_ast __pyx_string_tab[359]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[360]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[361]
#define __pyx_n_u_collections __pyx_string_tab[362]
#define __pyx_n_u_commas_start_of_line __pyx_string_tab[363]
#define __pyx_n_u_comment_count __pyx_string_tab[364]
#define __pyx_n_u_comments __pyx_string_tab[365]
#define __pyx_n_u_cstring __pyx_string_tab[366]
#define __pyx_n_u_cursorpos __pyx_string_tab[367]
#define __pyx_n_u_deparse_protobuf __pyx_string_tab[368]
#define __pyx_n_u_deparsed __pyx_string_tab[369]
#define __pyx_n_u_dict __pyx_string_tab[370]
#define __pyx_n_u_dict_2 __pyx_string_tab[371]
#define __pyx_n_u_doc __pyx_string_tab[372]
#define __pyx_n_u_end __pyx_string_tab[373]
#define __pyx_n_u_end_index __pyx_string_tab[374]
#define __pyx_n_u_enums __pyx_string_tab[375]
#define __pyx_n_u_fingerprint __pyx_string_tab[376]
#define __pyx_n_u_func __pyx_string_tab[377]
#define __pyx_n_u_get_postgresql_version __pyx_string_tab[378]
#define __pyx_n_u_getstate __pyx_string_tab[379]
#define __pyx_n_u_i __pyx_string_tab[380]
#define __pyx_n_u_indent_size __pyx_string_tab[381]
#define __pyx_n_u_is_coroutine __pyx_string_tab[382]
#define __pyx_n_u_item __pyx_string_tab[383]
#define __pyx_n_u_items __pyx_string_tab[384]
#define __pyx_n_u_kind __pyx_string_tab[385]
#define __pyx_n_u_kwkind __pyx_string_tab[386]
#define __pyx_n_u_leading_whitespace __pyx_string_tab[387]
#define __pyx_n_u_location __pyx_string_tab[388]
#define __pyx_n_u_lstrip __pyx_string_tab[389]
#define __pyx_n_u_main __pyx_string_tab[390]
#define __pyx_n_u_major __pyx_string_tab[391]
#define __pyx_n_u_match_location __pyx_string_tab[392]
#define __pyx_n_u_max_line_length __pyx_string_tab[393]
#define __pyx_n_u_mctx __pyx_string_tab[394]
#define __pyx_n_u_message __pyx_string_tab[395]
#define __pyx_n_u_metaclass __pyx_string_tab[396]
#define __pyx_n_u_minor __pyx_string_tab[397]
#define __pyx_n_u_module __pyx_string_tab[398]
#define __pyx_n_u_mro_entries __pyx_string_tab[399]
#define __pyx_n_u_name __pyx_string_tab[400]
#define __pyx_n_u_name_2 __pyx_string_tab[401]
#define __pyx_n_u_namedtuple __pyx_string_tab[402]
#define __pyx_n_u_new __pyx_string_tab[403]
#define __pyx_n_u_newlines_after_comment __pyx_string_tab[404]
#define __pyx_n_u_newlines_before_comment __pyx_string_tab[405]
#define __pyx_n_u_offset __pyx_string_tab[406]
#define __pyx_n_u_offset_to_index __pyx_string_tab[407]
#define __pyx_n_u_only_slices __pyx_string_tab[408]
#define __pyx_n_u_opts __pyx_string_tab[409]
#define __pyx_n_u_parse_plpgsql_json __pyx_string_tab[410]
#define __pyx_n_u_parse_sql __pyx_string_tab[411]
#define __pyx_n_u_parse_sql_json __pyx_string_tab[412]
#define __pyx_n_u_parse_sql_protobuf __pyx_string_tab[413]
#define __pyx_n_u_parsed __pyx_string_tab[414]
#define __pyx_n_u_pglast_2 __pyx_string_tab[415]
#define __pyx_n_u_pglast_parser __pyx_string_tab[416]
#define __pyx_n_u_pop __pyx_string_tab[417]
#define __pyx_n_u_prepare __pyx_string_tab[418]
#define __pyx_n_u_pretty_print __pyx_string_tab[419]
#define __pyx_n_u_protobuf __pyx_string_tab[420]
#define __pyx_n_u_pyx_checksum __pyx_string_tab[421]
#define __pyx_n_u_pyx_result __pyx_string_tab[422]
#define __pyx_n_u_pyx_state __pyx_string_tab[423]
#define __pyx_n_u_pyx_type __pyx_string_tab[424]
#define __pyx_n_u_pyx_unpickle_Displacements __pyx_string_tab[425]
#define __pyx_n_u_qualname __pyx_string_tab[426]
#define __pyx_n_u_query __pyx_string_tab[427]
#define __pyx_n_u_reduce __pyx_string_tab[428]
#define __pyx_n_u_reduce_cython __pyx_string_tab[429]
#define __pyx_n_u_reduce_ex __pyx_string_tab[430]
#define __pyx_n_u_result __pyx_string_tab[431]
#define __pyx_n_u_reversed __pyx_string_tab[432]
#define __pyx_n_u_rstrip __pyx_string_tab[433]
#define __pyx_n_u_s __pyx_string_tab[434]
#define __pyx_n_u_scan __pyx_string_tab[435]
#define __pyx_n_u_scan_result __pyx_string_tab[436]
#define __pyx_n_u_scan_token __pyx_string_tab[437]
#define __pyx_n_u_scanned __pyx_string_tab[438]
#define __pyx_n_u_self __pyx_string_tab[439]
#define __pyx_n_u_set_name __pyx_string_tab[440]
#define __pyx_n_u_setdefault __pyx_string_tab[441]
#define __pyx_n_u_setstate __pyx_string_tab[442]
#define __pyx_n_u_setstate_cython __pyx_string_tab[443]
#define __pyx_n_u_split __pyx_string_tab[444]
#define __pyx_n_u_splitted __pyx_string_tab[445]
#define __pyx_n_u_start __pyx_string_tab[446]
#define __pyx_n_u_start_index __pyx_string_tab[447]
#define __pyx_n_u_state __pyx_string_tab[448]
#define __pyx_n_u_stmt __pyx_string_tab[449]
#define __pyx_n_u_stmts __pyx_string_tab[450]
#define __pyx_n_u_str __pyx_string_tab[451]
#define __pyx_n_u_str_2 __pyx_string_tab[452]
#define __pyx_n_u_strip __pyx_string_tab[453]
#define __pyx_n_u_test __pyx_string_tab[454]
#define __pyx_n_u_tkind __pyx_string_tab[455]
#define __pyx_n_u_token __pyx_string_tab[456]
#define __pyx_n_u_trailing_newline __pyx_string_tab[457]
#define __pyx_n_u_tree __pyx_string_tab[458]
#define __pyx_n_u_type __pyx_string_tab[459]
#define __pyx_n_u_update __pyx_string_tab[460]
#define __pyx_n_u_use_setstate __pyx_string_tab[461]
#define __pyx_n_u_utf8 __pyx_string_tab[462]
#define __pyx_n_u_values __pyx_string_tab[463]
#define __pyx_n_u_version __pyx_string_tab[464]
#define __pyx_n_u_with_parser __pyx_string_tab[465]
#define __pyx_kp_b_iso88591_1F __pyx_string_tab[466]
#define __pyx_kp_b_iso88591_5_q_a_6_fF_fA_m1A_AYoQfF_AQ_RS __pyx_string_tab[467]
#define __pyx_kp_b_iso88591_5_q_a_Qa_6_fF_m1A_AYoQfF_AQ_v_W __pyx_string_tab[468]
#define __pyx_kp_b_iso88591_5_q_a_q_6_fF_m1A_AYoQfF_AQ_v_7 __pyx_string_tab[469]
#define __pyx_kp_b_iso88591_5_q_a_q_6_fF_m1A_AYoQfF_AQ_v_q __pyx_string_tab[470]
#define __pyx_kp_b_iso88591_5_q_m1A_a_1IQ_6_wa_Kq_e1_U_6_a __pyx_string_tab[471]
#define __pyx_kp_b_iso88591_5_q_m1A_a_q_7_gV87_1_AYoQgV_Qa __pyx_string_tab[472]
#define __pyx_kp_b_iso88591_8q_A_8Fa8EQ8DA8H_8I_8MQ_1Jat7_Q __pyx_string_tab[473]
#define __pyx_kp_b_iso88591_A_5_q_a_1_1_2_1_81_hfHG1A_m1A_A __pyx_string_tab[474]
#define __pyx_kp_b_iso88591_A_5_q_m1A_a_6aq_81_hfHG1A_AYoQh __pyx_string_tab[475]
#define __pyx_kp_b_iso88591_A_e1A_3at7_A_t5_y_q_1A_q __pyx_string_tab[476]
#define __pyx_kp_b_iso88591_A_e1A_3at7_A_t5_y_q_q __pyx_string_tab[477]
#define __pyx_kp_b_iso88591_T_Q_G1F_a_vWE_Q_q_t_q_d_7_WA_d __pyx_string_tab[478]
#define __pyx_kp_b_iso88591_a_86_1_G1 __pyx_string_tab[479]
#define __pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1 __pyx_string_tab[480]
#define __pyx_int_0 __pyx_number_tab[0]
#define __pyx_int_37136258 __pyx_number_tab[1]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(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);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #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);
  for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<15; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<481; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(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);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  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);
  for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<15; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<481; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */

/* "pglast/ast.pyx":17
 * 
 * 
 * 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":20
 *     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":21
 *     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(1, 21, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pglast/ast.pyx":22
 *     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":23
 *         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":24
 *         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_PyLong_From_int(__pyx_v_m); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 24, __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(1, 24, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pglast/ast.pyx":25
 *         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":20
 *     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":27
 *             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":28
 *     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":17
 * 
 * 
 * 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":31
 * 
 * 
 * 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":34
 *     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":35
 *     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(1, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pglast/ast.pyx":36
 *     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":37
 *         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(1, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "pglast/ast.pyx":38
 *         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":39
 *             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":34
 *     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":41
 *             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":42
 *     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":31
 * 
 * 
 * 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":45
 * 
 * 
 * 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_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_hasGroupRTE = 0;
  PyObject *__pyx_v_v_isReturn = 0;
  PyObject *__pyx_v_v_cteList = 0;
  PyObject *__pyx_v_v_rtable = 0;
  PyObject *__pyx_v_v_rteperminfos = 0;
  PyObject *__pyx_v_v_jointree = 0;
  PyObject *__pyx_v_v_mergeActionList = 0;
  PyObject *__pyx_v_v_mergeTargetRelation = 0;
  PyObject *__pyx_v_v_mergeJoinCondition = 0;
  PyObject *__pyx_v_v_targetList = 0;
  PyObject *__pyx_v_v_override = 0;
  PyObject *__pyx_v_v_onConflict = 0;
  PyObject *__pyx_v_v_returningOldAlias = 0;
  PyObject *__pyx_v_v_returningNewAlias = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Query", 0);

  /* "pglast/ast.pyx":46
 * 
 * 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_canSetTag = bool(data.canSetTag)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CmdType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_CmdType(__pyx_v_data->commandType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_commandType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":47
 * 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_canSetTag = bool(data.canSetTag)
 *     cdef object v_utilityStmt = create(data.utilityStmt, offset_to_index) if data.utilityStmt is not NULL else None
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_QuerySource); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_QuerySource(__pyx_v_data->querySource); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_querySource = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":48
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)
 *     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_PyBool_FromLong((!(!(__pyx_v_data->canSetTag != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_canSetTag = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":49
 *     cdef object v_querySource = getattr(enums, 'QuerySource')(data.querySource)
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->utilityStmt != NULL);
  if (__pyx_t_6) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->utilityStmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 49, __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":50
 *     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_PyLong_From_int(__pyx_v_data->resultRelation); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resultRelation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":51
 *     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_PyBool_FromLong((!(!(__pyx_v_data->hasAggs != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasAggs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":52
 *     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_PyBool_FromLong((!(!(__pyx_v_data->hasWindowFuncs != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasWindowFuncs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":53
 *     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_PyBool_FromLong((!(!(__pyx_v_data->hasTargetSRFs != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasTargetSRFs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":54
 *     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_PyBool_FromLong((!(!(__pyx_v_data->hasSubLinks != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasSubLinks = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":55
 *     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_PyBool_FromLong((!(!(__pyx_v_data->hasDistinctOn != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasDistinctOn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":56
 *     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_PyBool_FromLong((!(!(__pyx_v_data->hasRecursive != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasRecursive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":57
 *     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_PyBool_FromLong((!(!(__pyx_v_data->hasModifyingCTE != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasModifyingCTE = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":58
 *     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_hasGroupRTE = bool(data.hasGroupRTE)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->hasForUpdate != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasForUpdate = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":59
 *     cdef object v_hasModifyingCTE = bool(data.hasModifyingCTE)
 *     cdef object v_hasForUpdate = bool(data.hasForUpdate)
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)             # <<<<<<<<<<<<<<
 *     cdef object v_hasGroupRTE = bool(data.hasGroupRTE)
 *     cdef object v_isReturn = bool(data.isReturn)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->hasRowSecurity != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasRowSecurity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":60
 *     cdef object v_hasForUpdate = bool(data.hasForUpdate)
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)
 *     cdef object v_hasGroupRTE = bool(data.hasGroupRTE)             # <<<<<<<<<<<<<<
 *     cdef object v_isReturn = bool(data.isReturn)
 *     cdef tuple v_cteList = _pg_list_to_tuple(data.cteList, offset_to_index)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->hasGroupRTE != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hasGroupRTE = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":61
 *     cdef object v_hasRowSecurity = bool(data.hasRowSecurity)
 *     cdef object v_hasGroupRTE = bool(data.hasGroupRTE)
 *     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_PyBool_FromLong((!(!(__pyx_v_data->isReturn != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isReturn = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":62
 *     cdef object v_hasGroupRTE = bool(data.hasGroupRTE)
 *     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 tuple v_rteperminfos = _pg_list_to_tuple(data.rteperminfos, offset_to_index)
*/
  __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(1, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 62, __pyx_L1_error)
  __pyx_v_v_cteList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":63
 *     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 tuple v_rteperminfos = _pg_list_to_tuple(data.rteperminfos, 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->rtable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 63, __pyx_L1_error)
  __pyx_v_v_rtable = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":64
 *     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 tuple v_rteperminfos = _pg_list_to_tuple(data.rteperminfos, 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->rteperminfos, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 64, __pyx_L1_error)
  __pyx_v_v_rteperminfos = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":65
 *     cdef tuple v_rtable = _pg_list_to_tuple(data.rtable, offset_to_index)
 *     cdef tuple v_rteperminfos = _pg_list_to_tuple(data.rteperminfos, 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_mergeTargetRelation = data.mergeTargetRelation
*/
  __pyx_t_6 = (__pyx_v_data->jointree != NULL);
  if (__pyx_t_6) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->jointree, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __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":66
 *     cdef tuple v_rteperminfos = _pg_list_to_tuple(data.rteperminfos, 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_mergeTargetRelation = data.mergeTargetRelation
 *     cdef object v_mergeJoinCondition = create(data.mergeJoinCondition, offset_to_index) if data.mergeJoinCondition is not NULL else None
*/
  __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(1, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 66, __pyx_L1_error)
  __pyx_v_v_mergeActionList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":67
 *     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_mergeTargetRelation = data.mergeTargetRelation             # <<<<<<<<<<<<<<
 *     cdef object v_mergeJoinCondition = create(data.mergeJoinCondition, offset_to_index) if data.mergeJoinCondition is not NULL else None
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->mergeTargetRelation); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_mergeTargetRelation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":68
 *     cdef tuple v_mergeActionList = _pg_list_to_tuple(data.mergeActionList, offset_to_index)
 *     cdef object v_mergeTargetRelation = data.mergeTargetRelation
 *     cdef object v_mergeJoinCondition = create(data.mergeJoinCondition, offset_to_index) if data.mergeJoinCondition is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_targetList = _pg_list_to_tuple(data.targetList, offset_to_index)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
*/
  __pyx_t_6 = (__pyx_v_data->mergeJoinCondition != NULL);
  if (__pyx_t_6) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->mergeJoinCondition, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __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_mergeJoinCondition = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":69
 *     cdef object v_mergeTargetRelation = data.mergeTargetRelation
 *     cdef object v_mergeJoinCondition = create(data.mergeJoinCondition, offset_to_index) if data.mergeJoinCondition is not NULL else None
 *     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(1, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 69, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":70
 *     cdef object v_mergeJoinCondition = create(data.mergeJoinCondition, offset_to_index) if data.mergeJoinCondition is not NULL else None
 *     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 object v_returningOldAlias = data.returningOldAlias.decode("utf-8") if data.returningOldAlias is not NULL else None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":71
 *     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 object v_returningOldAlias = data.returningOldAlias.decode("utf-8") if data.returningOldAlias is not NULL else None
 *     cdef object v_returningNewAlias = data.returningNewAlias.decode("utf-8") if data.returningNewAlias is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->onConflict != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->onConflict, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 71, __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_onConflict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":72
 *     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 object v_returningOldAlias = data.returningOldAlias.decode("utf-8") if data.returningOldAlias is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_returningNewAlias = data.returningNewAlias.decode("utf-8") if data.returningNewAlias is not NULL else None
 *     cdef tuple v_returningList = _pg_list_to_tuple(data.returningList, offset_to_index)
*/
  __pyx_t_6 = (__pyx_v_data->returningOldAlias != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->returningOldAlias;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 72, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 72, __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_returningOldAlias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":73
 *     cdef object v_onConflict = create(data.onConflict, offset_to_index) if data.onConflict is not NULL else None
 *     cdef object v_returningOldAlias = data.returningOldAlias.decode("utf-8") if data.returningOldAlias is not NULL else None
 *     cdef object v_returningNewAlias = data.returningNewAlias.decode("utf-8") if data.returningNewAlias 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)
*/
  __pyx_t_6 = (__pyx_v_data->returningNewAlias != NULL);
  if (__pyx_t_6) {
    __pyx_t_9 = __pyx_v_data->returningNewAlias;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 73, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 73, __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_returningNewAlias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":74
 *     cdef object v_returningOldAlias = data.returningOldAlias.decode("utf-8") if data.returningOldAlias is not NULL else None
 *     cdef object v_returningNewAlias = data.returningNewAlias.decode("utf-8") if data.returningNewAlias 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(1, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 74, __pyx_L1_error)
  __pyx_v_v_returningList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":75
 *     cdef object v_returningNewAlias = data.returningNewAlias.decode("utf-8") if data.returningNewAlias 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(1, 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(1, 75, __pyx_L1_error)
  __pyx_v_v_groupClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":76
 *     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_PyBool_FromLong((!(!(__pyx_v_data->groupDistinct != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_groupDistinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":77
 *     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(1, 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(1, 77, __pyx_L1_error)
  __pyx_v_v_groupingSets = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":78
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->havingQual != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->havingQual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 78, __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_havingQual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":79
 *     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(1, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 79, __pyx_L1_error)
  __pyx_v_v_windowClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":80
 *     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(1, 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(1, 80, __pyx_L1_error)
  __pyx_v_v_distinctClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":81
 *     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(1, 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(1, 81, __pyx_L1_error)
  __pyx_v_v_sortClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":82
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->limitOffset != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 82, __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_limitOffset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":83
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->limitCount != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitCount, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 83, __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_limitCount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":84
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LimitOption); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_LimitOption(__pyx_v_data->limitOption); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_limitOption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":85
 *     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(1, 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(1, 85, __pyx_L1_error)
  __pyx_v_v_rowMarks = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":86
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->setOperations != NULL);
  if (__pyx_t_6) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setOperations, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 86, __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":87
 *     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(1, 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(1, 87, __pyx_L1_error)
  __pyx_v_v_constraintDeps = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":88
 *     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(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 88, __pyx_L1_error)
  __pyx_v_v_withCheckOptions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":89
 *     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_canSetTag, v_utilityStmt, v_resultRelation, v_hasAggs, v_hasWindowFuncs, v_hasTargetSRFs, v_hasSubLinks, v_hasDistinctOn, v_hasRecursive, v_hasModifyingCTE, v_hasForUpdate, v_hasRowSecurity, v_hasGroupRTE, v_isReturn, v_cteList, v_rtable, v_rteperminfos, v_jointree, v_mergeActionList, v_mergeTargetRelation, v_mergeJoinCondition, v_targetList, v_override, v_onConflict, v_returningOldAlias, v_returningNewAlias, 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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_stmt_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":90
 *     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_canSetTag, v_utilityStmt, v_resultRelation, v_hasAggs, v_hasWindowFuncs, v_hasTargetSRFs, v_hasSubLinks, v_hasDistinctOn, v_hasRecursive, v_hasModifyingCTE, v_hasForUpdate, v_hasRowSecurity, v_hasGroupRTE, v_isReturn, v_cteList, v_rtable, v_rteperminfos, v_jointree, v_mergeActionList, v_mergeTargetRelation, v_mergeJoinCondition, v_targetList, v_override, v_onConflict, v_returningOldAlias, v_returningNewAlias, 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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc((__pyx_v_data->stmt_location + __pyx_v_data->stmt_len)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_10 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_v_stmt_len = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pglast/ast.pyx":91
 *     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_canSetTag, v_utilityStmt, v_resultRelation, v_hasAggs, v_hasWindowFuncs, v_hasTargetSRFs, v_hasSubLinks, v_hasDistinctOn, v_hasRecursive, v_hasModifyingCTE, v_hasForUpdate, v_hasRowSecurity, v_hasGroupRTE, v_isReturn, v_cteList, v_rtable, v_rteperminfos, v_jointree, v_mergeActionList, v_mergeTargetRelation, v_mergeJoinCondition, v_targetList, v_override, v_onConflict, v_returningOldAlias, v_returningNewAlias, 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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Query); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[46] = {__pyx_t_4, __pyx_v_v_commandType, __pyx_v_v_querySource, __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_hasGroupRTE, __pyx_v_v_isReturn, __pyx_v_v_cteList, __pyx_v_v_rtable, __pyx_v_v_rteperminfos, __pyx_v_v_jointree, __pyx_v_v_mergeActionList, __pyx_v_v_mergeTargetRelation, __pyx_v_v_mergeJoinCondition, __pyx_v_v_targetList, __pyx_v_v_override, __pyx_v_v_onConflict, __pyx_v_v_returningOldAlias, __pyx_v_v_returningNewAlias, __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_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (46-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":45
 * 
 * 
 * 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_10);
  __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_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_hasGroupRTE);
  __Pyx_XDECREF(__pyx_v_v_isReturn);
  __Pyx_XDECREF(__pyx_v_v_cteList);
  __Pyx_XDECREF(__pyx_v_v_rtable);
  __Pyx_XDECREF(__pyx_v_v_rteperminfos);
  __Pyx_XDECREF(__pyx_v_v_jointree);
  __Pyx_XDECREF(__pyx_v_v_mergeActionList);
  __Pyx_XDECREF(__pyx_v_v_mergeTargetRelation);
  __Pyx_XDECREF(__pyx_v_v_mergeJoinCondition);
  __Pyx_XDECREF(__pyx_v_v_targetList);
  __Pyx_XDECREF(__pyx_v_v_override);
  __Pyx_XDECREF(__pyx_v_v_onConflict);
  __Pyx_XDECREF(__pyx_v_v_returningOldAlias);
  __Pyx_XDECREF(__pyx_v_v_returningNewAlias);
  __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":94
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TypeName", 0);

  /* "pglast/ast.pyx":95
 * 
 * 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(1, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 95, __pyx_L1_error)
  __pyx_v_v_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":96
 * 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_PyBool_FromLong((!(!(__pyx_v_data->setof != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_setof = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":97
 *     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_PyBool_FromLong((!(!(__pyx_v_data->pct_type != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_pct_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":98
 *     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(1, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 98, __pyx_L1_error)
  __pyx_v_v_typmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":99
 *     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_PyLong_From_int32_t(__pyx_v_data->typemod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typemod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":100
 *     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(1, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 100, __pyx_L1_error)
  __pyx_v_v_arrayBounds = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":101
 *     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_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":102
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TypeName); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":94
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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":105
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ColumnRef", 0);

  /* "pglast/ast.pyx":106
 * 
 * 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(1, 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(1, 106, __pyx_L1_error)
  __pyx_v_v_fields = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":107
 * 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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":108
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ColumnRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_fields, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":105
 * 
 * 
 * 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":111
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ParamRef", 0);

  /* "pglast/ast.pyx":112
 * 
 * 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_PyLong_From_int(__pyx_v_data->number); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_number = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":113
 * 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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":114
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ParamRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_number, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":111
 * 
 * 
 * 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":117
 * 
 * 
 * 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_rexpr_list_start = 0;
  PyObject *__pyx_v_v_rexpr_list_end = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Expr", 0);

  /* "pglast/ast.pyx":118
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_A_Expr_Kind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_A_Expr_Kind(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":119
 * 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(1, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 119, __pyx_L1_error)
  __pyx_v_v_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":120
 *     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_rexpr_list_start = offset_to_index(data.rexpr_list_start)
*/
  __pyx_t_6 = (__pyx_v_data->lexpr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->lexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 120, __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_lexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":121
 *     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_rexpr_list_start = offset_to_index(data.rexpr_list_start)
 *     cdef object v_rexpr_list_end = offset_to_index(data.rexpr_list_end)
*/
  __pyx_t_6 = (__pyx_v_data->rexpr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 121, __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_rexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":122
 *     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_rexpr_list_start = offset_to_index(data.rexpr_list_start)             # <<<<<<<<<<<<<<
 *     cdef object v_rexpr_list_end = offset_to_index(data.rexpr_list_end)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->rexpr_list_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_rexpr_list_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":123
 *     cdef object v_rexpr = create(data.rexpr, offset_to_index) if data.rexpr is not NULL else None
 *     cdef object v_rexpr_list_start = offset_to_index(data.rexpr_list_start)
 *     cdef object v_rexpr_list_end = offset_to_index(data.rexpr_list_end)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_Expr(v_kind, v_name, v_lexpr, v_rexpr, v_rexpr_list_start, v_rexpr_list_end, v_location)
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->rexpr_list_end); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_rexpr_list_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":124
 *     cdef object v_rexpr_list_start = offset_to_index(data.rexpr_list_start)
 *     cdef object v_rexpr_list_end = offset_to_index(data.rexpr_list_end)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.A_Expr(v_kind, v_name, v_lexpr, v_rexpr, v_rexpr_list_start, v_rexpr_list_end, v_location)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":125
 *     cdef object v_rexpr_list_end = offset_to_index(data.rexpr_list_end)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_Expr(v_kind, v_name, v_lexpr, v_rexpr, v_rexpr_list_start, v_rexpr_list_end, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_A_Expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __pyx_v_v_kind, __pyx_v_v_name, __pyx_v_v_lexpr, __pyx_v_v_rexpr, __pyx_v_v_rexpr_list_start, __pyx_v_v_rexpr_list_end, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":117
 * 
 * 
 * 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_rexpr_list_start);
  __Pyx_XDECREF(__pyx_v_v_rexpr_list_end);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":128
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TypeCast", 0);

  /* "pglast/ast.pyx":129
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 129, __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":130
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->typeName != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 130, __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":131
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":132
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_TypeCast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_typeName, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":128
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":135
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CollateClause", 0);

  /* "pglast/ast.pyx":136
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __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":137
 * 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(1, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 137, __pyx_L1_error)
  __pyx_v_v_collname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":138
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":139
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CollateClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_collname, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":135
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":142
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RoleSpec", 0);

  /* "pglast/ast.pyx":143
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RoleSpecType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_RoleSpecType(__pyx_v_data->roletype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_roletype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":144
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->rolename != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->rolename;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 144, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 144, __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_rolename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":145
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":146
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RoleSpec); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_roletype, __pyx_v_v_rolename, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":142
 * 
 * 
 * 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":149
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FuncCall", 0);

  /* "pglast/ast.pyx":150
 * 
 * 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(1, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 150, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":151
 * 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(1, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 151, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":152
 *     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(1, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 152, __pyx_L1_error)
  __pyx_v_v_agg_order = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":153
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->agg_filter != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->agg_filter, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 153, __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_agg_filter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":154
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->over != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->over, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 154, __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_over = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":155
 *     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_PyBool_FromLong((!(!(__pyx_v_data->agg_within_group != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agg_within_group = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":156
 *     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_PyBool_FromLong((!(!(__pyx_v_data->agg_star != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agg_star = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":157
 *     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_PyBool_FromLong((!(!(__pyx_v_data->agg_distinct != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agg_distinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":158
 *     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_PyBool_FromLong((!(!(__pyx_v_data->func_variadic != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_func_variadic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":159
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->funcformat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_funcformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":160
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":161
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FuncCall); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[12] = {__pyx_t_4, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (12-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":149
 * 
 * 
 * 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_3);
  __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":164
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Star", 0);

  /* "pglast/ast.pyx":165
 * 
 * cdef create_A_Star(structs.A_Star* data, offset_to_index):
 *     return ast.A_Star()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_A_Star); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":164
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":168
 * 
 * 
 * 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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Indices", 0);

  /* "pglast/ast.pyx":169
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->is_slice != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_slice = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":170
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->lidx != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->lidx, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 170, __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":171
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->uidx != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->uidx, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 171, __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":172
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_A_Indices); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":168
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __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":175
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Indirection", 0);

  /* "pglast/ast.pyx":176
 * 
 * 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_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 176, __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":177
 * 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(1, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 177, __pyx_L1_error)
  __pyx_v_v_indirection = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":178
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_A_Indirection); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_arg, __pyx_v_v_indirection};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":175
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":181
 * 
 * 
 * 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_list_start = offset_to_index(data.list_start)
*/

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_list_start = 0;
  PyObject *__pyx_v_v_list_end = 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;
  size_t __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":182
 * 
 * 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_list_start = offset_to_index(data.list_start)
 *     cdef object v_list_end = offset_to_index(data.list_end)
*/
  __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(1, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 182, __pyx_L1_error)
  __pyx_v_v_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":183
 * 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_list_start = offset_to_index(data.list_start)             # <<<<<<<<<<<<<<
 *     cdef object v_list_end = offset_to_index(data.list_end)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->list_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_list_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":184
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_list_start = offset_to_index(data.list_start)
 *     cdef object v_list_end = offset_to_index(data.list_end)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_ArrayExpr(v_elements, v_list_start, v_list_end, v_location)
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->list_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_list_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":185
 *     cdef object v_list_start = offset_to_index(data.list_start)
 *     cdef object v_list_end = offset_to_index(data.list_end)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.A_ArrayExpr(v_elements, v_list_start, v_list_end, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":186
 *     cdef object v_list_end = offset_to_index(data.list_end)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.A_ArrayExpr(v_elements, v_list_start, v_list_end, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_A_ArrayExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_elements, __pyx_v_v_list_start, __pyx_v_v_list_end, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":181
 * 
 * 
 * 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_list_start = offset_to_index(data.list_start)
*/

  /* 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_list_start);
  __Pyx_XDECREF(__pyx_v_v_list_end);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":189
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ResTarget", 0);

  /* "pglast/ast.pyx":190
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 190, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":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)             # <<<<<<<<<<<<<<
 *     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(1, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 191, __pyx_L1_error)
  __pyx_v_v_indirection = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":192
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->val != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->val, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":193
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":194
 *     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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ResTarget); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_v_name, __pyx_v_v_indirection, __pyx_v_v_val, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":189
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":197
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MultiAssignRef", 0);

  /* "pglast/ast.pyx":198
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->source != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->source, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 198, __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_source = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "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             # <<<<<<<<<<<<<<
 *     cdef object v_ncolumns = data.ncolumns
 *     return ast.MultiAssignRef(v_source, v_colno, v_ncolumns)
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->colno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_colno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":200
 *     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_PyLong_From_int(__pyx_v_data->ncolumns); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ncolumns = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":201
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MultiAssignRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_source, __pyx_v_v_colno, __pyx_v_v_ncolumns};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":197
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":204
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SortBy", 0);

  /* "pglast/ast.pyx":205
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->node != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->node, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 205, __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_node = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "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)             # <<<<<<<<<<<<<<
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SortByDir); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SortByDir(__pyx_v_data->sortby_dir); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_sortby_dir = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":207
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SortByNulls); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SortByNulls(__pyx_v_data->sortby_nulls); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_sortby_nulls = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":208
 *     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(1, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 208, __pyx_L1_error)
  __pyx_v_v_useOp = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":209
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":210
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_SortBy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":204
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":213
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WindowDef", 0);

  /* "pglast/ast.pyx":214
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 214, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":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             # <<<<<<<<<<<<<<
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->refname != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->refname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 215, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":216
 *     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(1, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 216, __pyx_L1_error)
  __pyx_v_v_partitionClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":217
 *     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(1, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 217, __pyx_L1_error)
  __pyx_v_v_orderClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":218
 *     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_PyLong_From_int(__pyx_v_data->frameOptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_frameOptions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":219
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->startOffset != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->startOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":220
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->endOffset != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->endOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":221
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_7 = __pyx_v_offset_to_index; 
  __pyx_t_8 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":222
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_WindowDef); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_7, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (9-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":213
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":225
 * 
 * 
 * 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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeSubselect", 0);

  /* "pglast/ast.pyx":226
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->lateral != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "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             # <<<<<<<<<<<<<<
 *     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_t_2 = (__pyx_v_data->subquery != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->subquery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 227, __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":228
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->alias != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __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":229
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RangeSubselect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":225
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __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":232
 * 
 * 
 * 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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeFunction", 0);

  /* "pglast/ast.pyx":233
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->lateral != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "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)             # <<<<<<<<<<<<<<
 *     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_PyBool_FromLong((!(!(__pyx_v_data->ordinality != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ordinality = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":235
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_rowsfrom != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_rowsfrom = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":236
 *     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(1, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 236, __pyx_L1_error)
  __pyx_v_v_functions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":237
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->alias != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 237, __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":238
 *     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(1, 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(1, 238, __pyx_L1_error)
  __pyx_v_v_coldeflist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":239
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RangeFunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":232
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __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":242
 * 
 * 
 * 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTableFunc", 0);

  /* "pglast/ast.pyx":243
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->lateral != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "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             # <<<<<<<<<<<<<<
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->docexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->docexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 244, __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":245
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->rowexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rowexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 245, __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":246
 *     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(1, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 246, __pyx_L1_error)
  __pyx_v_v_namespaces = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":247
 *     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(1, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 247, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":248
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->alias != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 248, __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":249
 *     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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":250
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_RangeTableFunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (8-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":242
 * 
 * 
 * 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":253
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTableFuncCol", 0);

  /* "pglast/ast.pyx":254
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->colname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->colname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 254, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":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             # <<<<<<<<<<<<<<
 *     cdef object v_for_ordinality = bool(data.for_ordinality)
 *     cdef object v_is_not_null = bool(data.is_not_null)
*/
  __pyx_t_2 = (__pyx_v_data->typeName != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":256
 *     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_PyBool_FromLong((!(!(__pyx_v_data->for_ordinality != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_ordinality = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":257
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_not_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_not_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":258
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->colexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->colexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":259
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->coldefexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->coldefexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":260
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":261
 *     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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_RangeTableFuncCol); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_6, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (8-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":253
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":264
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTableSample", 0);

  /* "pglast/ast.pyx":265
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 265, __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":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)             # <<<<<<<<<<<<<<
 *     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(1, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 266, __pyx_L1_error)
  __pyx_v_v_method = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":267
 *     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(1, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 267, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":268
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->repeatable != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->repeatable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 268, __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_repeatable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":269
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":270
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_RangeTableSample); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":264
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":273
 * 
 * 
 * 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_storage_name = 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ColumnDef", 0);

  /* "pglast/ast.pyx":274
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->colname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->colname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 274, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":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             # <<<<<<<<<<<<<<
 *     cdef object v_compression = data.compression.decode("utf-8") if data.compression is not NULL else None
 *     cdef object v_inhcount = data.inhcount
*/
  __pyx_t_2 = (__pyx_v_data->typeName != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":276
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->compression != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->compression;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 276, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":277
 *     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_PyLong_From_int16_t(__pyx_v_data->inhcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inhcount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":278
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_local != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_local = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":279
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_not_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_not_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":280
 *     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_storage_name = data.storage_name.decode("utf-8") if data.storage_name is not NULL else None
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->is_from_type != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_from_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":281
 *     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_storage_name = data.storage_name.decode("utf-8") if data.storage_name is not NULL else None
 *     cdef object v_raw_default = create(data.raw_default, offset_to_index) if data.raw_default is not NULL else None
*/
  __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_v_data->storage); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_storage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":282
 *     cdef object v_is_from_type = bool(data.is_from_type)
 *     cdef object v_storage = chr(data.storage)
 *     cdef object v_storage_name = data.storage_name.decode("utf-8") if data.storage_name is not NULL else None             # <<<<<<<<<<<<<<
 *     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_2 = (__pyx_v_data->storage_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->storage_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 282, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_storage_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":283
 *     cdef object v_storage = chr(data.storage)
 *     cdef object v_storage_name = data.storage_name.decode("utf-8") if data.storage_name is not NULL else None
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->raw_default != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->raw_default, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_raw_default = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":284
 *     cdef object v_storage_name = data.storage_name.decode("utf-8") if data.storage_name is not NULL else None
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->cooked_default != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cooked_default, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_cooked_default = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":285
 *     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_1 = PyUnicode_FromOrdinal(__pyx_v_data->identity); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_identity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":286
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->identitySequence != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->identitySequence, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":287
 *     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 = PyUnicode_FromOrdinal(__pyx_v_data->generated); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_generated = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":288
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->collClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->collClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":289
 *     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_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(1, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 289, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":290
 *     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_storage_name, v_raw_default, v_cooked_default, v_identity, v_identitySequence, v_generated, v_collClause, v_constraints, v_fdwoptions, v_location)
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fdwoptions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 290, __pyx_L1_error)
  __pyx_v_v_fdwoptions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":291
 *     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_storage_name, v_raw_default, v_cooked_default, v_identity, v_identitySequence, v_generated, v_collClause, v_constraints, v_fdwoptions, v_location)
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_8 = __pyx_v_offset_to_index; 
  __pyx_t_9 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_10 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":292
 *     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_storage_name, 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_t_8 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ColumnDef); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_10 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_10 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[19] = {__pyx_t_8, __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_storage_name, __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_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_10, (19-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":273
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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_storage_name);
  __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":295
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TableLikeClause", 0);

  /* "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
 *     return ast.TableLikeClause(v_relation, v_options)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 296, __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":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)
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_v_data->options); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_options = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":298
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TableLikeClause); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":295
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":301
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_IndexElem", 0);

  /* "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
 *     cdef object v_indexcolname = data.indexcolname.decode("utf-8") if data.indexcolname is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 302, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":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
 *     cdef tuple v_collation = _pg_list_to_tuple(data.collation, offset_to_index)
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":304
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->indexcolname != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->indexcolname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 304, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":305
 *     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(1, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 305, __pyx_L1_error)
  __pyx_v_v_collation = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":306
 *     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(1, 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(1, 306, __pyx_L1_error)
  __pyx_v_v_opclass = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":307
 *     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(1, 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(1, 307, __pyx_L1_error)
  __pyx_v_v_opclassopts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":308
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_GetAttr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_SortByDir); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyLong_From_SortByDir(__pyx_v_data->ordering); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_ordering = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":309
 *     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_t_8 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_SortByNulls); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyLong_From_SortByNulls(__pyx_v_data->nulls_ordering); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_nulls_ordering = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":310
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_IndexElem); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_5, __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((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (9-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":301
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":313
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DefElem", 0);

  /* "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
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->defnamespace != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->defnamespace;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 314, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":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
 *     cdef object v_defaction = getattr(enums, 'DefElemAction')(data.defaction)
*/
  __pyx_t_2 = (__pyx_v_data->defname != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->defname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 315, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":316
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":317
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_GetAttr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_DefElemAction); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyLong_From_DefElemAction(__pyx_v_data->defaction); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_defaction = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":318
 *     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_8 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_7 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":319
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DefElem); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_7, __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((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":313
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":322
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_LockingClause", 0);

  /* "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)
 *     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(1, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 323, __pyx_L1_error)
  __pyx_v_v_lockedRels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 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)
 *     return ast.LockingClause(v_lockedRels, v_strength, v_waitPolicy)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LockClauseStrength); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_LockClauseStrength(__pyx_v_data->strength); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_strength = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":325
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LockWaitPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_LockWaitPolicy(__pyx_v_data->waitPolicy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_waitPolicy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":326
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LockingClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":322
 * 
 * 
 * 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":329
 * 
 * 
 * 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_indent = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_XmlSerialize", 0);

  /* "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
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_XmlOptionType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_XmlOptionType(__pyx_v_data->xmloption); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_xmloption = __pyx_t_1;
  __pyx_t_1 = 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
 *     cdef object v_indent = bool(data.indent)
*/
  __pyx_t_6 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 331, __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_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":332
 *     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_indent = bool(data.indent)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_6 = (__pyx_v_data->typeName != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 332, __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_typeName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":333
 *     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_indent = bool(data.indent)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.XmlSerialize(v_xmloption, v_expr, v_typeName, v_indent, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->indent != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_indent = __pyx_t_1;
  __pyx_t_1 = 0;

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

  /* "pglast/ast.pyx":335
 *     cdef object v_indent = bool(data.indent)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.XmlSerialize(v_xmloption, v_expr, v_typeName, v_indent, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_XmlSerialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_xmloption, __pyx_v_v_expr, __pyx_v_v_typeName, __pyx_v_v_indent, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":329
 * 
 * 
 * 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_indent);
  __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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 339, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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)
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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(1, 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(1, 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(1, 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(1, 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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PartitionElem); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_6, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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 = getattr(enums, 'PartitionStrategy')(chr(data.strategy))
 *     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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  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 = getattr(enums, 'PartitionStrategy')(chr(data.strategy))             # <<<<<<<<<<<<<<
 *     cdef tuple v_partParams = _pg_list_to_tuple(data.partParams, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PartitionStrategy); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyUnicode_FromOrdinal(__pyx_v_data->strategy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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 = getattr(enums, 'PartitionStrategy')(chr(data.strategy))
 *     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(1, 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(1, 349, __pyx_L1_error)
  __pyx_v_v_partParams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":350
 *     cdef object v_strategy = getattr(enums, 'PartitionStrategy')(chr(data.strategy))
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PartitionSpec); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_strategy, __pyx_v_v_partParams, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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 = getattr(enums, 'PartitionStrategy')(chr(data.strategy))
 *     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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  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 = PyUnicode_FromOrdinal(__pyx_v_data->strategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_strategy = __pyx_t_1;
  __pyx_t_1 = 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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->is_default != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_default = __pyx_t_1;
  __pyx_t_1 = 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_1 = __Pyx_PyLong_From_int(__pyx_v_data->modulus); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_modulus = __pyx_t_1;
  __pyx_t_1 = 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_1 = __Pyx_PyLong_From_int(__pyx_v_data->remainder); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_remainder = __pyx_t_1;
  __pyx_t_1 = 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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->listdatums, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 359, __pyx_L1_error)
  __pyx_v_v_listdatums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->lowerdatums, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 360, __pyx_L1_error)
  __pyx_v_v_lowerdatums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->upperdatums, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 361, __pyx_L1_error)
  __pyx_v_v_upperdatums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 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_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PartitionBoundSpec); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __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_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PartitionRangeDatumKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_PartitionRangeDatumKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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)
*/
  __pyx_t_6 = (__pyx_v_data->value != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->value, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 368, __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_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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PartitionRangeDatum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_value, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 374, __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_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)
*/
  __pyx_t_2 = (__pyx_v_data->bound != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->bound, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 375, __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_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_PyBool_FromLong((!(!(__pyx_v_data->concurrent != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PartitionCmd); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_name, __pyx_v_v_bound, __pyx_v_v_concurrent};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_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
*/

static PyObject *__pyx_f_6pglast_6parser_create_RangeTblEntry(RangeTblEntry *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_v_v_eref = 0;
  PyObject *__pyx_v_v_rtekind = 0;
  PyObject *__pyx_v_v_inh = 0;
  PyObject *__pyx_v_v_relkind = 0;
  PyObject *__pyx_v_v_rellockmode = 0;
  PyObject *__pyx_v_v_perminfoindex = 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_groupexprs = 0;
  PyObject *__pyx_v_v_lateral = 0;
  PyObject *__pyx_v_v_inFromCl = 0;
  PyObject *__pyx_v_v_securityQuals = 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;
  size_t __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  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_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_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
*/
  __pyx_t_2 = (__pyx_v_data->alias != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 381, __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":382
 * cdef create_RangeTblEntry(structs.RangeTblEntry* data, offset_to_index):
 *     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_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
 *     cdef object v_inh = bool(data.inh)
*/
  __pyx_t_2 = (__pyx_v_data->eref != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->eref, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 382, __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_eref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":383
 *     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_rtekind = getattr(enums, 'RTEKind')(data.rtekind)             # <<<<<<<<<<<<<<
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_relkind = chr(data.relkind)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RTEKind); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_RTEKind(__pyx_v_data->rtekind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_rtekind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":384
 *     cdef object v_eref = create(data.eref, offset_to_index) if data.eref is not NULL else None
 *     cdef object v_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
 *     cdef object v_inh = bool(data.inh)             # <<<<<<<<<<<<<<
 *     cdef object v_relkind = chr(data.relkind)
 *     cdef object v_rellockmode = data.rellockmode
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->inh != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inh = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":385
 *     cdef object v_rtekind = getattr(enums, 'RTEKind')(data.rtekind)
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_relkind = chr(data.relkind)             # <<<<<<<<<<<<<<
 *     cdef object v_rellockmode = data.rellockmode
 *     cdef object v_perminfoindex = data.perminfoindex
*/
  __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_v_data->relkind); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_relkind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":386
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_relkind = chr(data.relkind)
 *     cdef object v_rellockmode = data.rellockmode             # <<<<<<<<<<<<<<
 *     cdef object v_perminfoindex = data.perminfoindex
 *     cdef object v_tablesample = create(data.tablesample, offset_to_index) if data.tablesample is not NULL else None
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->rellockmode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_rellockmode = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":387
 *     cdef object v_relkind = chr(data.relkind)
 *     cdef object v_rellockmode = data.rellockmode
 *     cdef object v_perminfoindex = data.perminfoindex             # <<<<<<<<<<<<<<
 *     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_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->perminfoindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_perminfoindex = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":388
 *     cdef object v_rellockmode = data.rellockmode
 *     cdef object v_perminfoindex = data.perminfoindex
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->tablesample != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->tablesample, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_v_v_tablesample = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":389
 *     cdef object v_perminfoindex = data.perminfoindex
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->subquery != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->subquery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":390
 *     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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->security_barrier != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_security_barrier = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":391
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JoinType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_JoinType(__pyx_v_data->jointype); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_jointype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":392
 *     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_1 = __Pyx_PyLong_From_int(__pyx_v_data->joinmergedcols); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_joinmergedcols = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":393
 *     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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->joinaliasvars, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 393, __pyx_L1_error)
  __pyx_v_v_joinaliasvars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":394
 *     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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->joinleftcols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 394, __pyx_L1_error)
  __pyx_v_v_joinleftcols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":395
 *     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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->joinrightcols, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 395, __pyx_L1_error)
  __pyx_v_v_joinrightcols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":396
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->join_using_alias != NULL);
  if (__pyx_t_2) {
    __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(1, 396, __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":397
 *     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_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(1, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 397, __pyx_L1_error)
  __pyx_v_v_functions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":398
 *     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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->funcordinality != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_funcordinality = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":399
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->tablefunc != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->tablefunc, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 399, __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_tablefunc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":400
 *     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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->values_lists, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 400, __pyx_L1_error)
  __pyx_v_v_values_lists = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":401
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->ctename != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->ctename;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 401, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 401, __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":402
 *     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_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->ctelevelsup); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ctelevelsup = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":403
 *     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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->self_reference != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_self_reference = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":404
 *     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_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(1, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 404, __pyx_L1_error)
  __pyx_v_v_coltypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":405
 *     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_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(1, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 405, __pyx_L1_error)
  __pyx_v_v_coltypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":406
 *     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_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(1, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 406, __pyx_L1_error)
  __pyx_v_v_colcollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":407
 *     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 tuple v_groupexprs = _pg_list_to_tuple(data.groupexprs, offset_to_index)
*/
  __pyx_t_2 = (__pyx_v_data->enrname != NULL);
  if (__pyx_t_2) {
    __pyx_t_9 = __pyx_v_data->enrname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 407, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __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_enrname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":408
 *     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 tuple v_groupexprs = _pg_list_to_tuple(data.groupexprs, offset_to_index)
 *     cdef object v_lateral = bool(data.lateral)
*/
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_data->enrtuples); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_enrtuples = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":409
 *     cdef object v_enrname = data.enrname.decode("utf-8") if data.enrname is not NULL else None
 *     cdef object v_enrtuples = data.enrtuples
 *     cdef tuple v_groupexprs = _pg_list_to_tuple(data.groupexprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_inFromCl = bool(data.inFromCl)
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->groupexprs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 409, __pyx_L1_error)
  __pyx_v_v_groupexprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":410
 *     cdef object v_enrtuples = data.enrtuples
 *     cdef tuple v_groupexprs = _pg_list_to_tuple(data.groupexprs, offset_to_index)
 *     cdef object v_lateral = bool(data.lateral)             # <<<<<<<<<<<<<<
 *     cdef object v_inFromCl = bool(data.inFromCl)
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->lateral != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":411
 *     cdef tuple v_groupexprs = _pg_list_to_tuple(data.groupexprs, offset_to_index)
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_inFromCl = bool(data.inFromCl)             # <<<<<<<<<<<<<<
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)
 *     return ast.RangeTblEntry(v_alias, v_eref, v_rtekind, v_inh, v_relkind, v_rellockmode, v_perminfoindex, 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_groupexprs, v_lateral, v_inFromCl, v_securityQuals)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->inFromCl != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inFromCl = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":412
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_inFromCl = bool(data.inFromCl)
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.RangeTblEntry(v_alias, v_eref, v_rtekind, v_inh, v_relkind, v_rellockmode, v_perminfoindex, 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_groupexprs, v_lateral, v_inFromCl, v_securityQuals)
 * 
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->securityQuals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 412, __pyx_L1_error)
  __pyx_v_v_securityQuals = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":413
 *     cdef object v_inFromCl = bool(data.inFromCl)
 *     cdef tuple v_securityQuals = _pg_list_to_tuple(data.securityQuals, offset_to_index)
 *     return ast.RangeTblEntry(v_alias, v_eref, v_rtekind, v_inh, v_relkind, v_rellockmode, v_perminfoindex, 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_groupexprs, v_lateral, v_inFromCl, v_securityQuals)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RangeTblEntry); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[33] = {__pyx_t_3, __pyx_v_v_alias, __pyx_v_v_eref, __pyx_v_v_rtekind, __pyx_v_v_inh, __pyx_v_v_relkind, __pyx_v_v_rellockmode, __pyx_v_v_perminfoindex, __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_groupexprs, __pyx_v_v_lateral, __pyx_v_v_inFromCl, __pyx_v_v_securityQuals};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (33-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":380
 * 
 * 
 * cdef create_RangeTblEntry(structs.RangeTblEntry* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     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
*/

  /* 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_RangeTblEntry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XDECREF(__pyx_v_v_eref);
  __Pyx_XDECREF(__pyx_v_v_rtekind);
  __Pyx_XDECREF(__pyx_v_v_inh);
  __Pyx_XDECREF(__pyx_v_v_relkind);
  __Pyx_XDECREF(__pyx_v_v_rellockmode);
  __Pyx_XDECREF(__pyx_v_v_perminfoindex);
  __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_groupexprs);
  __Pyx_XDECREF(__pyx_v_v_lateral);
  __Pyx_XDECREF(__pyx_v_v_inFromCl);
  __Pyx_XDECREF(__pyx_v_v_securityQuals);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":416
 * 
 * 
 * cdef create_RTEPermissionInfo(structs.RTEPermissionInfo* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_requiredPerms = data.requiredPerms
*/

static PyObject *__pyx_f_6pglast_6parser_create_RTEPermissionInfo(RTEPermissionInfo *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_inh = 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_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RTEPermissionInfo", 0);

  /* "pglast/ast.pyx":417
 * 
 * cdef create_RTEPermissionInfo(structs.RTEPermissionInfo* data, offset_to_index):
 *     cdef object v_inh = bool(data.inh)             # <<<<<<<<<<<<<<
 *     cdef object v_requiredPerms = data.requiredPerms
 *     cdef set v_selectedCols = _pg_bitmapset_to_set(data.selectedCols)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->inh != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inh = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":418
 * cdef create_RTEPermissionInfo(structs.RTEPermissionInfo* data, offset_to_index):
 *     cdef object v_inh = bool(data.inh)
 *     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_1 = __Pyx_PyLong_From_uint64_t(__pyx_v_data->requiredPerms); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_requiredPerms = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":419
 *     cdef object v_inh = bool(data.inh)
 *     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_1 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->selectedCols); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __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(1, 419, __pyx_L1_error)
  __pyx_v_v_selectedCols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":420
 *     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)
 *     return ast.RTEPermissionInfo(v_inh, v_requiredPerms, v_selectedCols, v_insertedCols, v_updatedCols)
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->insertedCols); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 420, __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(1, 420, __pyx_L1_error)
  __pyx_v_v_insertedCols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":421
 *     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)             # <<<<<<<<<<<<<<
 *     return ast.RTEPermissionInfo(v_inh, v_requiredPerms, v_selectedCols, v_insertedCols, v_updatedCols)
 * 
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->updatedCols); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 421, __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(1, 421, __pyx_L1_error)
  __pyx_v_v_updatedCols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":422
 *     cdef set v_insertedCols = _pg_bitmapset_to_set(data.insertedCols)
 *     cdef set v_updatedCols = _pg_bitmapset_to_set(data.updatedCols)
 *     return ast.RTEPermissionInfo(v_inh, v_requiredPerms, v_selectedCols, v_insertedCols, v_updatedCols)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RTEPermissionInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_inh, __pyx_v_v_requiredPerms, __pyx_v_v_selectedCols, __pyx_v_v_insertedCols, __pyx_v_v_updatedCols};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":416
 * 
 * 
 * cdef create_RTEPermissionInfo(structs.RTEPermissionInfo* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_inh = bool(data.inh)
 *     cdef object v_requiredPerms = data.requiredPerms
*/

  /* 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_RTEPermissionInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_inh);
  __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_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":425
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTblFunction", 0);

  /* "pglast/ast.pyx":426
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->funcexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->funcexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 426, __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_funcexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":427
 * 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_PyLong_From_int(__pyx_v_data->funccolcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_funccolcount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":428
 *     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(1, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 428, __pyx_L1_error)
  __pyx_v_v_funccolnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":429
 *     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(1, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 429, __pyx_L1_error)
  __pyx_v_v_funccoltypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":430
 *     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(1, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 430, __pyx_L1_error)
  __pyx_v_v_funccoltypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":431
 *     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(1, 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(1, 431, __pyx_L1_error)
  __pyx_v_v_funccolcollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":432
 *     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(1, 432, __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(1, 432, __pyx_L1_error)
  __pyx_v_v_funcparams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":433
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RangeTblFunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (8-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":425
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":436
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TableSampleClause", 0);

  /* "pglast/ast.pyx":437
 * 
 * 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(1, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 437, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":438
 * 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_2 = (__pyx_v_data->repeatable != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->repeatable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 438, __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_repeatable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":439
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TableSampleClause); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_args, __pyx_v_v_repeatable};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":436
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":442
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WithCheckOption", 0);

  /* "pglast/ast.pyx":443
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WCOKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_WCOKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":444
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->relname != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->relname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 444, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 444, __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_relname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":445
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->polname != NULL);
  if (__pyx_t_6) {
    __pyx_t_9 = __pyx_v_data->polname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 445, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 445, __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_polname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":446
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->qual != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 446, __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_qual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":447
 *     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_PyBool_FromLong((!(!(__pyx_v_data->cascaded != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cascaded = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":448
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_WithCheckOption); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":442
 * 
 * 
 * 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":451
 * 
 * 
 * cdef create_SortGroupClause(structs.SortGroupClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_tleSortGroupRef = data.tleSortGroupRef
 *     cdef object v_reverse_sort = bool(data.reverse_sort)
*/

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_reverse_sort = 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SortGroupClause", 0);

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

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

  /* "pglast/ast.pyx":454
 *     cdef object v_tleSortGroupRef = data.tleSortGroupRef
 *     cdef object v_reverse_sort = bool(data.reverse_sort)
 *     cdef object v_nulls_first = bool(data.nulls_first)             # <<<<<<<<<<<<<<
 *     cdef object v_hashable = bool(data.hashable)
 *     return ast.SortGroupClause(v_tleSortGroupRef, v_reverse_sort, v_nulls_first, v_hashable)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->nulls_first != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nulls_first = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":455
 *     cdef object v_reverse_sort = bool(data.reverse_sort)
 *     cdef object v_nulls_first = bool(data.nulls_first)
 *     cdef object v_hashable = bool(data.hashable)             # <<<<<<<<<<<<<<
 *     return ast.SortGroupClause(v_tleSortGroupRef, v_reverse_sort, v_nulls_first, v_hashable)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->hashable != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_hashable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":456
 *     cdef object v_nulls_first = bool(data.nulls_first)
 *     cdef object v_hashable = bool(data.hashable)
 *     return ast.SortGroupClause(v_tleSortGroupRef, v_reverse_sort, v_nulls_first, v_hashable)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SortGroupClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_tleSortGroupRef, __pyx_v_v_reverse_sort, __pyx_v_v_nulls_first, __pyx_v_v_hashable};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* 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_SortGroupClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_tleSortGroupRef);
  __Pyx_XDECREF(__pyx_v_v_reverse_sort);
  __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":459
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_GroupingSet", 0);

  /* "pglast/ast.pyx":460
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GroupingSetKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_GroupingSetKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":461
 * 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(1, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 461, __pyx_L1_error)
  __pyx_v_v_content = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":462
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":463
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_GroupingSet); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_content, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":459
 * 
 * 
 * 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":466
 * 
 * 
 * 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_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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WindowClause", 0);

  /* "pglast/ast.pyx":467
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 467, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":468
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->refname != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->refname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 468, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":469
 *     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(1, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 469, __pyx_L1_error)
  __pyx_v_v_partitionClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":470
 *     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(1, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 470, __pyx_L1_error)
  __pyx_v_v_orderClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":471
 *     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_PyLong_From_int(__pyx_v_data->frameOptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_frameOptions = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":472
 *     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_inRangeAsc = bool(data.inRangeAsc)
*/
  __pyx_t_2 = (__pyx_v_data->startOffset != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->startOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":473
 *     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_inRangeAsc = bool(data.inRangeAsc)
 *     cdef object v_inRangeNullsFirst = bool(data.inRangeNullsFirst)
*/
  __pyx_t_2 = (__pyx_v_data->endOffset != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->endOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":474
 *     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_inRangeAsc = bool(data.inRangeAsc)             # <<<<<<<<<<<<<<
 *     cdef object v_inRangeNullsFirst = bool(data.inRangeNullsFirst)
 *     cdef object v_winref = data.winref
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->inRangeAsc != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inRangeAsc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":475
 *     cdef object v_endOffset = create(data.endOffset, offset_to_index) if data.endOffset is not NULL else None
 *     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_PyBool_FromLong((!(!(__pyx_v_data->inRangeNullsFirst != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inRangeNullsFirst = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":476
 *     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_inRangeAsc, v_inRangeNullsFirst, v_winref, v_copiedOrder)
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->winref); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":477
 *     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_inRangeAsc, v_inRangeNullsFirst, v_winref, v_copiedOrder)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->copiedOrder != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_copiedOrder = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":478
 *     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_inRangeAsc, v_inRangeNullsFirst, v_winref, v_copiedOrder)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_WindowClause); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[12] = {__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_inRangeAsc, __pyx_v_v_inRangeNullsFirst, __pyx_v_v_winref, __pyx_v_v_copiedOrder};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (12-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":466
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_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":481
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RowMarkClause", 0);

  /* "pglast/ast.pyx":482
 * 
 * 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_PyLong_From_unsigned_int(__pyx_v_data->rti); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_rti = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":483
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LockClauseStrength); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_LockClauseStrength(__pyx_v_data->strength); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_strength = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":484
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LockWaitPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_LockWaitPolicy(__pyx_v_data->waitPolicy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_waitPolicy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":485
 *     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_PyBool_FromLong((!(!(__pyx_v_data->pushedDown != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_pushedDown = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":486
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RowMarkClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":481
 * 
 * 
 * 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":489
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WithClause", 0);

  /* "pglast/ast.pyx":490
 * 
 * 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(1, 490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 490, __pyx_L1_error)
  __pyx_v_v_ctes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":491
 * 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_PyBool_FromLong((!(!(__pyx_v_data->recursive != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_recursive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":492
 *     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_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":493
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WithClause); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_ctes, __pyx_v_v_recursive, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":489
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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":496
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InferClause", 0);

  /* "pglast/ast.pyx":497
 * 
 * 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(1, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 497, __pyx_L1_error)
  __pyx_v_v_indexElems = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":498
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 498, __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":499
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->conname != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->conname;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 499, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 499, __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":500
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":501
 *     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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_InferClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_v_indexElems, __pyx_v_v_whereClause, __pyx_v_v_conname, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":496
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":504
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_OnConflictClause", 0);

  /* "pglast/ast.pyx":505
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OnConflictAction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_OnConflictAction(__pyx_v_data->action); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":506
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->infer != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->infer, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __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_infer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":507
 *     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(1, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 507, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":508
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __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_whereClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":509
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":510
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OnConflictClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __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((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":504
 * 
 * 
 * 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":513
 * 
 * 
 * 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;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CTESearchClause", 0);

  /* "pglast/ast.pyx":514
 * 
 * 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(1, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 514, __pyx_L1_error)
  __pyx_v_v_search_col_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":515
 * 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_PyBool_FromLong((!(!(__pyx_v_data->search_breadth_first != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_search_breadth_first = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":516
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->search_seq_column != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->search_seq_column;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 516, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":517
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":518
 *     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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CTESearchClause); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_6, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":513
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":521
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CTECycleClause", 0);

  /* "pglast/ast.pyx":522
 * 
 * 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(1, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 522, __pyx_L1_error)
  __pyx_v_v_cycle_col_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":523
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->cycle_mark_column != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->cycle_mark_column;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 523, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":524
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->cycle_mark_value != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cycle_mark_value, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":525
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->cycle_mark_default != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cycle_mark_default, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":526
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->cycle_path_column != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->cycle_path_column;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 526, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":527
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_7 = __pyx_v_offset_to_index; 
  __pyx_t_8 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":528
 *     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_PyLong_From_int(__pyx_v_data->cycle_mark_typmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cycle_mark_typmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":529
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_CTECycleClause); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_7, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (8-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":521
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":532
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CommonTableExpr", 0);

  /* "pglast/ast.pyx":533
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->ctename != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->ctename;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 533, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":534
 * 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(1, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 534, __pyx_L1_error)
  __pyx_v_v_aliascolnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":535
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CTEMaterialize); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_CTEMaterialize(__pyx_v_data->ctematerialized); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_ctematerialized = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":536
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->ctequery != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_f_6pglast_6parser_create(__pyx_v_data->ctequery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 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":537
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->search_clause != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_f_6pglast_6parser_create(__pyx_v_data->search_clause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 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":538
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->cycle_clause != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_f_6pglast_6parser_create(__pyx_v_data->cycle_clause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 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":539
 *     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_7 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":540
 *     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_PyBool_FromLong((!(!(__pyx_v_data->cterecursive != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cterecursive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":541
 *     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_PyLong_From_int(__pyx_v_data->cterefcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cterefcount = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":542
 *     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(1, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 542, __pyx_L1_error)
  __pyx_v_v_ctecolnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":543
 *     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(1, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 543, __pyx_L1_error)
  __pyx_v_v_ctecoltypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":544
 *     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(1, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 544, __pyx_L1_error)
  __pyx_v_v_ctecoltypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":545
 *     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(1, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 545, __pyx_L1_error)
  __pyx_v_v_ctecolcollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":546
 *     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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CommonTableExpr); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[14] = {__pyx_t_6, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (14-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":532
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":549
 * 
 * 
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     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_matchKind = 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  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":550
 * 
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)             # <<<<<<<<<<<<<<
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MergeMatchKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_MergeMatchKind(__pyx_v_data->matchKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_matchKind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":551
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CmdType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_CmdType(__pyx_v_data->commandType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_commandType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":552
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":553
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->condition != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->condition, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 553, __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_condition = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":554
 *     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_matchKind, 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(1, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 554, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":555
 *     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_matchKind, 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(1, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 555, __pyx_L1_error)
  __pyx_v_v_values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":556
 *     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_matchKind, v_commandType, v_override, v_condition, v_targetList, v_values)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MergeWhenClause); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_matchKind, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":549
 * 
 * 
 * cdef create_MergeWhenClause(structs.MergeWhenClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
*/

  /* 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_MergeWhenClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_matchKind);
  __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":559
 * 
 * 
 * cdef create_ReturningOption(structs.ReturningOption* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_option = getattr(enums, 'ReturningOptionKind')(data.option)
 *     cdef object v_value = data.value.decode("utf-8") if data.value is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_ReturningOption(ReturningOption *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_option = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReturningOption", 0);

  /* "pglast/ast.pyx":560
 * 
 * cdef create_ReturningOption(structs.ReturningOption* data, offset_to_index):
 *     cdef object v_option = getattr(enums, 'ReturningOptionKind')(data.option)             # <<<<<<<<<<<<<<
 *     cdef object v_value = data.value.decode("utf-8") if data.value is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ReturningOptionKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ReturningOptionKind(__pyx_v_data->option); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_option = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":561
 * cdef create_ReturningOption(structs.ReturningOption* data, offset_to_index):
 *     cdef object v_option = getattr(enums, 'ReturningOptionKind')(data.option)
 *     cdef object v_value = data.value.decode("utf-8") if data.value is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ReturningOption(v_option, v_value, v_location)
*/
  __pyx_t_6 = (__pyx_v_data->value != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->value;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 561, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 561, __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_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":562
 *     cdef object v_option = getattr(enums, 'ReturningOptionKind')(data.option)
 *     cdef object v_value = data.value.decode("utf-8") if data.value is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ReturningOption(v_option, v_value, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":563
 *     cdef object v_value = data.value.decode("utf-8") if data.value is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ReturningOption(v_option, v_value, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ReturningOption); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_option, __pyx_v_v_value, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":559
 * 
 * 
 * cdef create_ReturningOption(structs.ReturningOption* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_option = getattr(enums, 'ReturningOptionKind')(data.option)
 *     cdef object v_value = data.value.decode("utf-8") 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_ReturningOption", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_option);
  __Pyx_XDECREF(__pyx_v_v_value);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":566
 * 
 * 
 * cdef create_ReturningClause(structs.ReturningClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
*/

static PyObject *__pyx_f_6pglast_6parser_create_ReturningClause(ReturningClause *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_options = 0;
  PyObject *__pyx_v_v_exprs = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReturningClause", 0);

  /* "pglast/ast.pyx":567
 * 
 * cdef create_ReturningClause(structs.ReturningClause* data, offset_to_index):
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     return ast.ReturningClause(v_options, v_exprs)
*/
  __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(1, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 567, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":568
 * cdef create_ReturningClause(structs.ReturningClause* data, offset_to_index):
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     return ast.ReturningClause(v_options, v_exprs)
 * 
*/
  __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(1, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 568, __pyx_L1_error)
  __pyx_v_v_exprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":569
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     return ast.ReturningClause(v_options, v_exprs)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ReturningClause); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_options, __pyx_v_v_exprs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":566
 * 
 * 
 * cdef create_ReturningClause(structs.ReturningClause* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_options = _pg_list_to_tuple(data.options, offset_to_index)
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, 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_ReturningClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_options);
  __Pyx_XDECREF(__pyx_v_v_exprs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":572
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TriggerTransition", 0);

  /* "pglast/ast.pyx":573
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 573, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":574
 * 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_PyBool_FromLong((!(!(__pyx_v_data->isNew != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isNew = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":575
 *     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_PyBool_FromLong((!(!(__pyx_v_data->isTable != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isTable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":576
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TriggerTransition); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_name, __pyx_v_v_isNew, __pyx_v_v_isTable};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":572
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":579
 * 
 * 
 * cdef create_JsonOutput(structs.JsonOutput* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonOutput(JsonOutput *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_returning = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonOutput", 0);

  /* "pglast/ast.pyx":580
 * 
 * cdef create_JsonOutput(structs.JsonOutput* data, offset_to_index):
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     return ast.JsonOutput(v_typeName, v_returning)
*/
  __pyx_t_2 = (__pyx_v_data->typeName != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 580, __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":581
 * cdef create_JsonOutput(structs.JsonOutput* data, offset_to_index):
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.JsonOutput(v_typeName, v_returning)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->returning != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returning, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 581, __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_returning = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":582
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     return ast.JsonOutput(v_typeName, v_returning)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonOutput); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_typeName, __pyx_v_v_returning};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":579
 * 
 * 
 * cdef create_JsonOutput(structs.JsonOutput* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning 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_JsonOutput", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_returning);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":585
 * 
 * 
 * cdef create_JsonArgument(structs.JsonArgument* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_val = create(data.val, offset_to_index) if data.val 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_JsonArgument(JsonArgument *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_val = 0;
  PyObject *__pyx_v_v_name = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonArgument", 0);

  /* "pglast/ast.pyx":586
 * 
 * cdef create_JsonArgument(structs.JsonArgument* data, offset_to_index):
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.JsonArgument(v_val, v_name)
*/
  __pyx_t_2 = (__pyx_v_data->val != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->val, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 586, __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":587
 * cdef create_JsonArgument(structs.JsonArgument* data, offset_to_index):
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.JsonArgument(v_val, v_name)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->name;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 587, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 587, __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":588
 *     cdef object v_val = create(data.val, offset_to_index) if data.val is not NULL else None
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     return ast.JsonArgument(v_val, v_name)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_JsonArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_val, __pyx_v_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":585
 * 
 * 
 * cdef create_JsonArgument(structs.JsonArgument* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_val = create(data.val, offset_to_index) if data.val 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_JsonArgument", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_val);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":591
 * 
 * 
 * cdef create_JsonFuncExpr(structs.JsonFuncExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonFuncExpr(JsonFuncExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_op = 0;
  PyObject *__pyx_v_v_column_name = 0;
  PyObject *__pyx_v_v_context_item = 0;
  PyObject *__pyx_v_v_pathspec = 0;
  PyObject *__pyx_v_v_passing = 0;
  PyObject *__pyx_v_v_output = 0;
  PyObject *__pyx_v_v_on_empty = 0;
  PyObject *__pyx_v_v_on_error = 0;
  PyObject *__pyx_v_v_wrapper = 0;
  PyObject *__pyx_v_v_quotes = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonFuncExpr", 0);

  /* "pglast/ast.pyx":592
 * 
 * cdef create_JsonFuncExpr(structs.JsonFuncExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)             # <<<<<<<<<<<<<<
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonExprOp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonExprOp(__pyx_v_data->op); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":593
 * cdef create_JsonFuncExpr(structs.JsonFuncExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->column_name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->column_name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 593, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 593, __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_column_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":594
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
*/
  __pyx_t_6 = (__pyx_v_data->context_item != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->context_item, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 594, __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_context_item = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":595
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->pathspec != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->pathspec, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 595, __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_pathspec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":596
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->passing, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 596, __pyx_L1_error)
  __pyx_v_v_passing = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":597
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->output != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 597, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":598
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
*/
  __pyx_t_6 = (__pyx_v_data->on_empty != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->on_empty, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 598, __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_on_empty = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":599
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
*/
  __pyx_t_6 = (__pyx_v_data->on_error != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->on_error, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 599, __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_on_error = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":600
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)             # <<<<<<<<<<<<<<
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonWrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonWrapper(__pyx_v_data->wrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_wrapper = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":601
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonFuncExpr(v_op, v_column_name, v_context_item, v_pathspec, v_passing, v_output, v_on_empty, v_on_error, v_wrapper, v_quotes, v_location)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonQuotes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonQuotes(__pyx_v_data->quotes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_quotes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":602
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonFuncExpr(v_op, v_column_name, v_context_item, v_pathspec, v_passing, v_output, v_on_empty, v_on_error, v_wrapper, v_quotes, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":603
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonFuncExpr(v_op, v_column_name, v_context_item, v_pathspec, v_passing, v_output, v_on_empty, v_on_error, v_wrapper, v_quotes, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_JsonFuncExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[12] = {__pyx_t_3, __pyx_v_v_op, __pyx_v_v_column_name, __pyx_v_v_context_item, __pyx_v_v_pathspec, __pyx_v_v_passing, __pyx_v_v_output, __pyx_v_v_on_empty, __pyx_v_v_on_error, __pyx_v_v_wrapper, __pyx_v_v_quotes, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (12-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":591
 * 
 * 
 * cdef create_JsonFuncExpr(structs.JsonFuncExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_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_JsonFuncExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_op);
  __Pyx_XDECREF(__pyx_v_v_column_name);
  __Pyx_XDECREF(__pyx_v_v_context_item);
  __Pyx_XDECREF(__pyx_v_v_pathspec);
  __Pyx_XDECREF(__pyx_v_v_passing);
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_on_empty);
  __Pyx_XDECREF(__pyx_v_v_on_error);
  __Pyx_XDECREF(__pyx_v_v_wrapper);
  __Pyx_XDECREF(__pyx_v_v_quotes);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":606
 * 
 * 
 * cdef create_JsonTablePathSpec(structs.JsonTablePathSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_string = create(data.string, offset_to_index) if data.string 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_JsonTablePathSpec(JsonTablePathSpec *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_string = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_name_location = 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;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonTablePathSpec", 0);

  /* "pglast/ast.pyx":607
 * 
 * cdef create_JsonTablePathSpec(structs.JsonTablePathSpec* data, offset_to_index):
 *     cdef object v_string = create(data.string, offset_to_index) if data.string 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_name_location = offset_to_index(data.name_location)
*/
  __pyx_t_2 = (__pyx_v_data->string != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->string, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 607, __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_string = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":608
 * cdef create_JsonTablePathSpec(structs.JsonTablePathSpec* data, offset_to_index):
 *     cdef object v_string = create(data.string, offset_to_index) if data.string 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_name_location = offset_to_index(data.name_location)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->name;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 608, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 608, __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":609
 *     cdef object v_string = create(data.string, offset_to_index) if data.string 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_name_location = offset_to_index(data.name_location)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonTablePathSpec(v_string, v_name, v_name_location, v_location)
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->name_location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_name_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":610
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_name_location = offset_to_index(data.name_location)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonTablePathSpec(v_string, v_name, v_name_location, v_location)
 * 
*/
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_7 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":611
 *     cdef object v_name_location = offset_to_index(data.name_location)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonTablePathSpec(v_string, v_name, v_name_location, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonTablePathSpec); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_v_v_string, __pyx_v_v_name, __pyx_v_v_name_location, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":606
 * 
 * 
 * cdef create_JsonTablePathSpec(structs.JsonTablePathSpec* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_string = create(data.string, offset_to_index) if data.string 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_JsonTablePathSpec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_string);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_name_location);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":614
 * 
 * 
 * cdef create_JsonTable(structs.JsonTable* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonTable(JsonTable *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_context_item = 0;
  PyObject *__pyx_v_v_pathspec = 0;
  PyObject *__pyx_v_v_passing = 0;
  PyObject *__pyx_v_v_columns = 0;
  PyObject *__pyx_v_v_on_error = 0;
  PyObject *__pyx_v_v_alias = 0;
  PyObject *__pyx_v_v_lateral = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonTable", 0);

  /* "pglast/ast.pyx":615
 * 
 * cdef create_JsonTable(structs.JsonTable* data, offset_to_index):
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
*/
  __pyx_t_2 = (__pyx_v_data->context_item != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->context_item, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 615, __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_context_item = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":616
 * cdef create_JsonTable(structs.JsonTable* data, offset_to_index):
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
*/
  __pyx_t_2 = (__pyx_v_data->pathspec != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->pathspec, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 616, __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_pathspec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":617
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->passing, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 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(1, 617, __pyx_L1_error)
  __pyx_v_v_passing = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":618
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error 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_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->columns, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 618, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":619
 *     cdef tuple v_passing = _pg_list_to_tuple(data.passing, offset_to_index)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error 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_lateral = bool(data.lateral)
*/
  __pyx_t_2 = (__pyx_v_data->on_error != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->on_error, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 619, __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_on_error = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":620
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error 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_lateral = bool(data.lateral)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->alias != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 620, __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":621
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error 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_lateral = bool(data.lateral)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonTable(v_context_item, v_pathspec, v_passing, v_columns, v_on_error, v_alias, v_lateral, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->lateral != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_lateral = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":622
 *     cdef object v_alias = create(data.alias, offset_to_index) if data.alias is not NULL else None
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonTable(v_context_item, v_pathspec, v_passing, v_columns, v_on_error, v_alias, v_lateral, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":623
 *     cdef object v_lateral = bool(data.lateral)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonTable(v_context_item, v_pathspec, v_passing, v_columns, v_on_error, v_alias, v_lateral, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_4, __pyx_v_v_context_item, __pyx_v_v_pathspec, __pyx_v_v_passing, __pyx_v_v_columns, __pyx_v_v_on_error, __pyx_v_v_alias, __pyx_v_v_lateral, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (9-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":614
 * 
 * 
 * cdef create_JsonTable(structs.JsonTable* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_context_item = create(data.context_item, offset_to_index) if data.context_item is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec 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_JsonTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_context_item);
  __Pyx_XDECREF(__pyx_v_v_pathspec);
  __Pyx_XDECREF(__pyx_v_v_passing);
  __Pyx_XDECREF(__pyx_v_v_columns);
  __Pyx_XDECREF(__pyx_v_v_on_error);
  __Pyx_XDECREF(__pyx_v_v_alias);
  __Pyx_XDECREF(__pyx_v_v_lateral);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":626
 * 
 * 
 * cdef create_JsonTableColumn(structs.JsonTableColumn* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_coltype = getattr(enums, 'JsonTableColumnType')(data.coltype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonTableColumn(JsonTableColumn *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_coltype = 0;
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_typeName = 0;
  PyObject *__pyx_v_v_pathspec = 0;
  PyObject *__pyx_v_v_format = 0;
  PyObject *__pyx_v_v_wrapper = 0;
  PyObject *__pyx_v_v_quotes = 0;
  PyObject *__pyx_v_v_columns = 0;
  PyObject *__pyx_v_v_on_empty = 0;
  PyObject *__pyx_v_v_on_error = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonTableColumn", 0);

  /* "pglast/ast.pyx":627
 * 
 * cdef create_JsonTableColumn(structs.JsonTableColumn* data, offset_to_index):
 *     cdef object v_coltype = getattr(enums, 'JsonTableColumnType')(data.coltype)             # <<<<<<<<<<<<<<
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonTableColumnType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonTableColumnType(__pyx_v_data->coltype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_coltype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":628
 * cdef create_JsonTableColumn(structs.JsonTableColumn* data, offset_to_index):
 *     cdef object v_coltype = getattr(enums, 'JsonTableColumnType')(data.coltype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name 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_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 628, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 628, __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_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":629
 *     cdef object v_coltype = getattr(enums, 'JsonTableColumnType')(data.coltype)
 *     cdef object v_name = data.name.decode("utf-8") if data.name 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_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->typeName != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 629, __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_typeName = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":630
 *     cdef object v_name = data.name.decode("utf-8") if data.name 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_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
*/
  __pyx_t_6 = (__pyx_v_data->pathspec != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->pathspec, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 630, __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_pathspec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":631
 *     cdef object v_typeName = create(data.typeName, offset_to_index) if data.typeName is not NULL else None
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
*/
  __pyx_t_6 = (__pyx_v_data->format != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->format, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 631, __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_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":632
 *     cdef object v_pathspec = create(data.pathspec, offset_to_index) if data.pathspec is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)             # <<<<<<<<<<<<<<
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonWrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonWrapper(__pyx_v_data->wrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_wrapper = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":633
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)             # <<<<<<<<<<<<<<
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonQuotes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonQuotes(__pyx_v_data->quotes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_quotes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":634
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
*/
  __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(1, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 634, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":635
 *     cdef object v_quotes = getattr(enums, 'JsonQuotes')(data.quotes)
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_6 = (__pyx_v_data->on_empty != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->on_empty, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 635, __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_on_empty = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":636
 *     cdef tuple v_columns = _pg_list_to_tuple(data.columns, offset_to_index)
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonTableColumn(v_coltype, v_name, v_typeName, v_pathspec, v_format, v_wrapper, v_quotes, v_columns, v_on_empty, v_on_error, v_location)
*/
  __pyx_t_6 = (__pyx_v_data->on_error != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->on_error, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 636, __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_on_error = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":637
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonTableColumn(v_coltype, v_name, v_typeName, v_pathspec, v_format, v_wrapper, v_quotes, v_columns, v_on_empty, v_on_error, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":638
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonTableColumn(v_coltype, v_name, v_typeName, v_pathspec, v_format, v_wrapper, v_quotes, v_columns, v_on_empty, v_on_error, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_JsonTableColumn); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[12] = {__pyx_t_3, __pyx_v_v_coltype, __pyx_v_v_name, __pyx_v_v_typeName, __pyx_v_v_pathspec, __pyx_v_v_format, __pyx_v_v_wrapper, __pyx_v_v_quotes, __pyx_v_v_columns, __pyx_v_v_on_empty, __pyx_v_v_on_error, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (12-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":626
 * 
 * 
 * cdef create_JsonTableColumn(structs.JsonTableColumn* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_coltype = getattr(enums, 'JsonTableColumnType')(data.coltype)
 *     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_JsonTableColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_coltype);
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_typeName);
  __Pyx_XDECREF(__pyx_v_v_pathspec);
  __Pyx_XDECREF(__pyx_v_v_format);
  __Pyx_XDECREF(__pyx_v_v_wrapper);
  __Pyx_XDECREF(__pyx_v_v_quotes);
  __Pyx_XDECREF(__pyx_v_v_columns);
  __Pyx_XDECREF(__pyx_v_v_on_empty);
  __Pyx_XDECREF(__pyx_v_v_on_error);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":641
 * 
 * 
 * cdef create_JsonKeyValue(structs.JsonKeyValue* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_key = create(data.key, offset_to_index) if data.key is not NULL else None
 *     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_JsonKeyValue(JsonKeyValue *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_key = 0;
  PyObject *__pyx_v_v_value = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonKeyValue", 0);

  /* "pglast/ast.pyx":642
 * 
 * cdef create_JsonKeyValue(structs.JsonKeyValue* data, offset_to_index):
 *     cdef object v_key = create(data.key, offset_to_index) if data.key is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None
 *     return ast.JsonKeyValue(v_key, v_value)
*/
  __pyx_t_2 = (__pyx_v_data->key != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->key, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 642, __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_key = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":643
 * cdef create_JsonKeyValue(structs.JsonKeyValue* data, offset_to_index):
 *     cdef object v_key = create(data.key, offset_to_index) if data.key is not NULL else None
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.JsonKeyValue(v_key, v_value)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->value != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->value, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":644
 *     cdef object v_key = create(data.key, offset_to_index) if data.key is not NULL else None
 *     cdef object v_value = create(data.value, offset_to_index) if data.value is not NULL else None
 *     return ast.JsonKeyValue(v_key, v_value)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonKeyValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_key, __pyx_v_v_value};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":641
 * 
 * 
 * cdef create_JsonKeyValue(structs.JsonKeyValue* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_key = create(data.key, offset_to_index) if data.key is not NULL else None
 *     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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pglast.parser.create_JsonKeyValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_key);
  __Pyx_XDECREF(__pyx_v_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":647
 * 
 * 
 * cdef create_JsonParseExpr(structs.JsonParseExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonParseExpr(JsonParseExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_output = 0;
  PyObject *__pyx_v_v_unique_keys = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonParseExpr", 0);

  /* "pglast/ast.pyx":648
 * 
 * cdef create_JsonParseExpr(structs.JsonParseExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_unique_keys = bool(data.unique_keys)
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 648, __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":649
 * cdef create_JsonParseExpr(structs.JsonParseExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_unique_keys = bool(data.unique_keys)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->output != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 649, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":650
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_unique_keys = bool(data.unique_keys)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonParseExpr(v_expr, v_output, v_unique_keys, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->unique_keys != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unique_keys = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":651
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_unique_keys = bool(data.unique_keys)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonParseExpr(v_expr, v_output, v_unique_keys, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":652
 *     cdef object v_unique_keys = bool(data.unique_keys)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonParseExpr(v_expr, v_output, v_unique_keys, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonParseExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_expr, __pyx_v_v_output, __pyx_v_v_unique_keys, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":647
 * 
 * 
 * cdef create_JsonParseExpr(structs.JsonParseExpr* 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_output = create(data.output, offset_to_index) if data.output 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_JsonParseExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_unique_keys);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":655
 * 
 * 
 * cdef create_JsonScalarExpr(structs.JsonScalarExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonScalarExpr(JsonScalarExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_output = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonScalarExpr", 0);

  /* "pglast/ast.pyx":656
 * 
 * cdef create_JsonScalarExpr(structs.JsonScalarExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 656, __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":657
 * cdef create_JsonScalarExpr(structs.JsonScalarExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonScalarExpr(v_expr, v_output, v_location)
*/
  __pyx_t_2 = (__pyx_v_data->output != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 657, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":658
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonScalarExpr(v_expr, v_output, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":659
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonScalarExpr(v_expr, v_output, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonScalarExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_expr, __pyx_v_v_output, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":655
 * 
 * 
 * cdef create_JsonScalarExpr(structs.JsonScalarExpr* 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_output = create(data.output, offset_to_index) if data.output 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_JsonScalarExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":662
 * 
 * 
 * cdef create_JsonSerializeExpr(structs.JsonSerializeExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonSerializeExpr(JsonSerializeExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_output = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonSerializeExpr", 0);

  /* "pglast/ast.pyx":663
 * 
 * cdef create_JsonSerializeExpr(structs.JsonSerializeExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __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":664
 * cdef create_JsonSerializeExpr(structs.JsonSerializeExpr* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonSerializeExpr(v_expr, v_output, v_location)
*/
  __pyx_t_2 = (__pyx_v_data->output != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 664, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":665
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonSerializeExpr(v_expr, v_output, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":666
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonSerializeExpr(v_expr, v_output, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonSerializeExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_expr, __pyx_v_v_output, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":662
 * 
 * 
 * cdef create_JsonSerializeExpr(structs.JsonSerializeExpr* 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_output = create(data.output, offset_to_index) if data.output 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_JsonSerializeExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":669
 * 
 * 
 * cdef create_JsonObjectConstructor(structs.JsonObjectConstructor* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonObjectConstructor(JsonObjectConstructor *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_exprs = 0;
  PyObject *__pyx_v_v_output = 0;
  PyObject *__pyx_v_v_absent_on_null = 0;
  PyObject *__pyx_v_v_unique = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonObjectConstructor", 0);

  /* "pglast/ast.pyx":670
 * 
 * cdef create_JsonObjectConstructor(structs.JsonObjectConstructor* data, offset_to_index):
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
*/
  __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(1, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 670, __pyx_L1_error)
  __pyx_v_v_exprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":671
 * cdef create_JsonObjectConstructor(structs.JsonObjectConstructor* data, offset_to_index):
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)
*/
  __pyx_t_2 = (__pyx_v_data->output != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 671, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":672
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)             # <<<<<<<<<<<<<<
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->absent_on_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_absent_on_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":673
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonObjectConstructor(v_exprs, v_output, v_absent_on_null, v_unique, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->unique != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unique = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":674
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonObjectConstructor(v_exprs, v_output, v_absent_on_null, v_unique, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":675
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonObjectConstructor(v_exprs, v_output, v_absent_on_null, v_unique, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonObjectConstructor); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_v_exprs, __pyx_v_v_output, __pyx_v_v_absent_on_null, __pyx_v_v_unique, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":669
 * 
 * 
 * cdef create_JsonObjectConstructor(structs.JsonObjectConstructor* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output 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_JsonObjectConstructor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_exprs);
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_absent_on_null);
  __Pyx_XDECREF(__pyx_v_v_unique);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":678
 * 
 * 
 * cdef create_JsonArrayConstructor(structs.JsonArrayConstructor* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonArrayConstructor(JsonArrayConstructor *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_exprs = 0;
  PyObject *__pyx_v_v_output = 0;
  PyObject *__pyx_v_v_absent_on_null = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonArrayConstructor", 0);

  /* "pglast/ast.pyx":679
 * 
 * cdef create_JsonArrayConstructor(structs.JsonArrayConstructor* data, offset_to_index):
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
*/
  __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(1, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 679, __pyx_L1_error)
  __pyx_v_v_exprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":680
 * cdef create_JsonArrayConstructor(structs.JsonArrayConstructor* data, offset_to_index):
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->output != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 680, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":681
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonArrayConstructor(v_exprs, v_output, v_absent_on_null, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->absent_on_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_absent_on_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":682
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonArrayConstructor(v_exprs, v_output, v_absent_on_null, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":683
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonArrayConstructor(v_exprs, v_output, v_absent_on_null, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonArrayConstructor); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_exprs, __pyx_v_v_output, __pyx_v_v_absent_on_null, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":678
 * 
 * 
 * cdef create_JsonArrayConstructor(structs.JsonArrayConstructor* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef tuple v_exprs = _pg_list_to_tuple(data.exprs, offset_to_index)
 *     cdef object v_output = create(data.output, offset_to_index) if data.output 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_JsonArrayConstructor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_exprs);
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_absent_on_null);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":686
 * 
 * 
 * cdef create_JsonArrayQueryConstructor(structs.JsonArrayQueryConstructor* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonArrayQueryConstructor(JsonArrayQueryConstructor *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_query = 0;
  PyObject *__pyx_v_v_output = 0;
  PyObject *__pyx_v_v_format = 0;
  PyObject *__pyx_v_v_absent_on_null = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonArrayQueryConstructor", 0);

  /* "pglast/ast.pyx":687
 * 
 * cdef create_JsonArrayQueryConstructor(structs.JsonArrayQueryConstructor* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->query != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 687, __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":688
 * cdef create_JsonArrayQueryConstructor(structs.JsonArrayQueryConstructor* 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_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
*/
  __pyx_t_2 = (__pyx_v_data->output != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 688, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":689
 *     cdef object v_query = create(data.query, offset_to_index) if data.query is not NULL else None
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->format != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->format, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 689, __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_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":690
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonArrayQueryConstructor(v_query, v_output, v_format, v_absent_on_null, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->absent_on_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_absent_on_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":691
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonArrayQueryConstructor(v_query, v_output, v_format, v_absent_on_null, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":692
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonArrayQueryConstructor(v_query, v_output, v_format, v_absent_on_null, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonArrayQueryConstructor); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_v_query, __pyx_v_v_output, __pyx_v_v_format, __pyx_v_v_absent_on_null, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":686
 * 
 * 
 * cdef create_JsonArrayQueryConstructor(structs.JsonArrayQueryConstructor* 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_output = create(data.output, offset_to_index) if data.output 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_JsonArrayQueryConstructor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_query);
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_format);
  __Pyx_XDECREF(__pyx_v_v_absent_on_null);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":695
 * 
 * 
 * cdef create_JsonAggConstructor(structs.JsonAggConstructor* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonAggConstructor(JsonAggConstructor *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_output = 0;
  PyObject *__pyx_v_v_agg_filter = 0;
  PyObject *__pyx_v_v_agg_order = 0;
  PyObject *__pyx_v_v_over = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonAggConstructor", 0);

  /* "pglast/ast.pyx":696
 * 
 * cdef create_JsonAggConstructor(structs.JsonAggConstructor* data, offset_to_index):
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
*/
  __pyx_t_2 = (__pyx_v_data->output != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->output, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __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_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":697
 * cdef create_JsonAggConstructor(structs.JsonAggConstructor* data, offset_to_index):
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->agg_filter != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->agg_filter, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 697, __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_agg_filter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":698
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_over = create(data.over, offset_to_index) if data.over 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->agg_order, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 698, __pyx_L1_error)
  __pyx_v_v_agg_order = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":699
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter is not NULL else None
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonAggConstructor(v_output, v_agg_filter, v_agg_order, v_over, v_location)
*/
  __pyx_t_2 = (__pyx_v_data->over != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->over, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 699, __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_over = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":700
 *     cdef tuple v_agg_order = _pg_list_to_tuple(data.agg_order, offset_to_index)
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonAggConstructor(v_output, v_agg_filter, v_agg_order, v_over, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":701
 *     cdef object v_over = create(data.over, offset_to_index) if data.over is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonAggConstructor(v_output, v_agg_filter, v_agg_order, v_over, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_JsonAggConstructor); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_v_output, __pyx_v_v_agg_filter, __pyx_v_v_agg_order, __pyx_v_v_over, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":695
 * 
 * 
 * cdef create_JsonAggConstructor(structs.JsonAggConstructor* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_output = create(data.output, offset_to_index) if data.output is not NULL else None
 *     cdef object v_agg_filter = create(data.agg_filter, offset_to_index) if data.agg_filter 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_JsonAggConstructor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_output);
  __Pyx_XDECREF(__pyx_v_v_agg_filter);
  __Pyx_XDECREF(__pyx_v_v_agg_order);
  __Pyx_XDECREF(__pyx_v_v_over);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":704
 * 
 * 
 * cdef create_JsonObjectAgg(structs.JsonObjectAgg* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor is not NULL else None
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonObjectAgg(JsonObjectAgg *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_constructor = 0;
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_absent_on_null = 0;
  PyObject *__pyx_v_v_unique = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonObjectAgg", 0);

  /* "pglast/ast.pyx":705
 * 
 * cdef create_JsonObjectAgg(structs.JsonObjectAgg* data, offset_to_index):
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor 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_absent_on_null = bool(data.absent_on_null)
*/
  __pyx_t_2 = (__pyx_v_data->constructor != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->constructor, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 705, __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_constructor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":706
 * cdef create_JsonObjectAgg(structs.JsonObjectAgg* data, offset_to_index):
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor 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_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 706, __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":707
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor 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_absent_on_null = bool(data.absent_on_null)             # <<<<<<<<<<<<<<
 *     cdef object v_unique = bool(data.unique)
 *     return ast.JsonObjectAgg(v_constructor, v_arg, v_absent_on_null, v_unique)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->absent_on_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_absent_on_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":708
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)             # <<<<<<<<<<<<<<
 *     return ast.JsonObjectAgg(v_constructor, v_arg, v_absent_on_null, v_unique)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->unique != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unique = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":709
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)
 *     return ast.JsonObjectAgg(v_constructor, v_arg, v_absent_on_null, v_unique)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonObjectAgg); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_constructor, __pyx_v_v_arg, __pyx_v_v_absent_on_null, __pyx_v_v_unique};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":704
 * 
 * 
 * cdef create_JsonObjectAgg(structs.JsonObjectAgg* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor is not NULL else None
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg 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_JsonObjectAgg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_constructor);
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_absent_on_null);
  __Pyx_XDECREF(__pyx_v_v_unique);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":712
 * 
 * 
 * cdef create_JsonArrayAgg(structs.JsonArrayAgg* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor is not NULL else None
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonArrayAgg(JsonArrayAgg *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_constructor = 0;
  PyObject *__pyx_v_v_arg = 0;
  PyObject *__pyx_v_v_absent_on_null = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonArrayAgg", 0);

  /* "pglast/ast.pyx":713
 * 
 * cdef create_JsonArrayAgg(structs.JsonArrayAgg* data, offset_to_index):
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor 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_absent_on_null = bool(data.absent_on_null)
*/
  __pyx_t_2 = (__pyx_v_data->constructor != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->constructor, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 713, __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_constructor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":714
 * cdef create_JsonArrayAgg(structs.JsonArrayAgg* data, offset_to_index):
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor 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_absent_on_null = bool(data.absent_on_null)
 *     return ast.JsonArrayAgg(v_constructor, v_arg, v_absent_on_null)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 714, __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":715
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor 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_absent_on_null = bool(data.absent_on_null)             # <<<<<<<<<<<<<<
 *     return ast.JsonArrayAgg(v_constructor, v_arg, v_absent_on_null)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->absent_on_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_absent_on_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":716
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     return ast.JsonArrayAgg(v_constructor, v_arg, v_absent_on_null)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonArrayAgg); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_constructor, __pyx_v_v_arg, __pyx_v_v_absent_on_null};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":712
 * 
 * 
 * cdef create_JsonArrayAgg(structs.JsonArrayAgg* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_constructor = create(data.constructor, offset_to_index) if data.constructor is not NULL else None
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg 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_JsonArrayAgg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_constructor);
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XDECREF(__pyx_v_v_absent_on_null);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":719
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RawStmt", 0);

  /* "pglast/ast.pyx":720
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->stmt != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->stmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 720, __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_stmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":721
 * 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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_stmt_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":722
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_5 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc((__pyx_v_data->stmt_location + __pyx_v_data->stmt_len)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->stmt_location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v_stmt_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pglast/ast.pyx":723
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RawStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_stmt, __pyx_v_v_stmt_location, __pyx_v_v_stmt_len};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":719
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __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":726
 * 
 * 
 * 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_returningClause = 0;
  PyObject *__pyx_v_v_withClause = 0;
  PyObject *__pyx_v_v_override = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InsertStmt", 0);

  /* "pglast/ast.pyx":727
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 727, __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":728
 * 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(1, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 728, __pyx_L1_error)
  __pyx_v_v_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":729
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->selectStmt != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->selectStmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 729, __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_selectStmt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":730
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->onConflictClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->onConflictClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 730, __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_onConflictClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":731
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None             # <<<<<<<<<<<<<<
 *     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_2 = (__pyx_v_data->returningClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returningClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 731, __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_returningClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":732
 *     cdef object v_onConflictClause = create(data.onConflictClause, offset_to_index) if data.onConflictClause is not NULL else None
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause, v_override)
*/
  __pyx_t_2 = (__pyx_v_data->withClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 732, __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_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":733
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause, v_override)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":734
 *     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_returningClause, v_withClause, v_override)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_InsertStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_5, __pyx_v_v_relation, __pyx_v_v_cols, __pyx_v_v_selectStmt, __pyx_v_v_onConflictClause, __pyx_v_v_returningClause, __pyx_v_v_withClause, __pyx_v_v_override};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (8-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":726
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_returningClause);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XDECREF(__pyx_v_v_override);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":737
 * 
 * 
 * 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_returningClause = 0;
  PyObject *__pyx_v_v_withClause = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DeleteStmt", 0);

  /* "pglast/ast.pyx":738
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 738, __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":739
 * 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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause 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(1, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 739, __pyx_L1_error)
  __pyx_v_v_usingClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":740
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     cdef object v_withClause = create(data.withClause, offset_to_index) if data.withClause is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 740, __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":741
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None             # <<<<<<<<<<<<<<
 *     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_returningClause, v_withClause)
*/
  __pyx_t_2 = (__pyx_v_data->returningClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returningClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 741, __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_returningClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":742
 *     cdef object v_whereClause = create(data.whereClause, offset_to_index) if data.whereClause is not NULL else None
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->withClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 742, __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_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":743
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DeleteStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_usingClause, __pyx_v_v_whereClause, __pyx_v_v_returningClause, __pyx_v_v_withClause};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":737
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_returningClause);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":746
 * 
 * 
 * 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_returningClause = 0;
  PyObject *__pyx_v_v_withClause = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_UpdateStmt", 0);

  /* "pglast/ast.pyx":747
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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_relation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":748
 * 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(1, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 748, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":749
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 749, __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":750
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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(1, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 750, __pyx_L1_error)
  __pyx_v_v_fromClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":751
 *     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 object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None             # <<<<<<<<<<<<<<
 *     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_returningClause, v_withClause)
*/
  __pyx_t_2 = (__pyx_v_data->returningClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returningClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 751, __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_returningClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":752
 *     cdef tuple v_fromClause = _pg_list_to_tuple(data.fromClause, offset_to_index)
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->withClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 752, __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_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":753
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UpdateStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_targetList, __pyx_v_v_whereClause, __pyx_v_v_fromClause, __pyx_v_v_returningClause, __pyx_v_v_withClause};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":746
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_returningClause);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":756
 * 
 * 
 * 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_returningClause = 0;
  PyObject *__pyx_v_v_withClause = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MergeStmt", 0);

  /* "pglast/ast.pyx":757
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 757, __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":758
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->sourceRelation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sourceRelation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 758, __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_sourceRelation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":759
 *     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_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->joinCondition != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->joinCondition, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 759, __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_joinCondition = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":760
 *     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_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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->mergeWhenClauses, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 760, __pyx_L1_error)
  __pyx_v_v_mergeWhenClauses = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":761
 *     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_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None             # <<<<<<<<<<<<<<
 *     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_returningClause, v_withClause)
*/
  __pyx_t_2 = (__pyx_v_data->returningClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returningClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 761, __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_returningClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":762
 *     cdef tuple v_mergeWhenClauses = _pg_list_to_tuple(data.mergeWhenClauses, offset_to_index)
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->withClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 762, __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_withClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":763
 *     cdef object v_returningClause = create(data.returningClause, offset_to_index) if data.returningClause is not NULL else None
 *     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_returningClause, v_withClause)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MergeStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_sourceRelation, __pyx_v_v_joinCondition, __pyx_v_v_mergeWhenClauses, __pyx_v_v_returningClause, __pyx_v_v_withClause};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":756
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_returningClause);
  __Pyx_XDECREF(__pyx_v_v_withClause);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":766
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SelectStmt", 0);

  /* "pglast/ast.pyx":767
 * 
 * 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(1, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 767, __pyx_L1_error)
  __pyx_v_v_distinctClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":768
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->intoClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->intoClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 768, __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_intoClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":769
 *     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(1, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 769, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":770
 *     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(1, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 770, __pyx_L1_error)
  __pyx_v_v_fromClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":771
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 771, __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":772
 *     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(1, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 772, __pyx_L1_error)
  __pyx_v_v_groupClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":773
 *     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_PyBool_FromLong((!(!(__pyx_v_data->groupDistinct != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_groupDistinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":774
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->havingClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->havingClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 774, __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_havingClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":775
 *     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(1, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 775, __pyx_L1_error)
  __pyx_v_v_windowClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":776
 *     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(1, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 776, __pyx_L1_error)
  __pyx_v_v_valuesLists = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":777
 *     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(1, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 777, __pyx_L1_error)
  __pyx_v_v_sortClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":778
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->limitOffset != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitOffset, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __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":779
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->limitCount != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->limitCount, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 779, __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":780
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LimitOption); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_LimitOption(__pyx_v_data->limitOption); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_limitOption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":781
 *     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(1, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 781, __pyx_L1_error)
  __pyx_v_v_lockingClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":782
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->withClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->withClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":783
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SetOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SetOperation(__pyx_v_data->op); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":784
 *     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_PyBool_FromLong((!(!(__pyx_v_data->all != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_all = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":785
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->larg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->larg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 785, __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":786
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->rarg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rarg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 786, __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":787
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SelectStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[21] = {__pyx_t_3, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (21-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":766
 * 
 * 
 * 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_3);
  __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":790
 * 
 * 
 * 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;
  size_t __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":791
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SetOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_SetOperation(__pyx_v_data->op); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":792
 * 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_PyBool_FromLong((!(!(__pyx_v_data->all != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_all = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":793
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->larg != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->larg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 793, __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_larg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":794
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->rarg != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rarg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 794, __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_rarg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":795
 *     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(1, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 795, __pyx_L1_error)
  __pyx_v_v_colTypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":796
 *     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(1, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 796, __pyx_L1_error)
  __pyx_v_v_colTypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":797
 *     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(1, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 797, __pyx_L1_error)
  __pyx_v_v_colCollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":798
 *     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(1, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 798, __pyx_L1_error)
  __pyx_v_v_groupClauses = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":799
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SetOperationStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":790
 * 
 * 
 * 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":802
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReturnStmt", 0);

  /* "pglast/ast.pyx":803
 * 
 * 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_t_2 = (__pyx_v_data->returnval != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returnval, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __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_returnval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":804
 * 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReturnStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_returnval};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":802
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":807
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PLAssignStmt", 0);

  /* "pglast/ast.pyx":808
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 808, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":809
 * 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(1, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 809, __pyx_L1_error)
  __pyx_v_v_indirection = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":810
 *     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_PyLong_From_int(__pyx_v_data->nnames); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nnames = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":811
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->val != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->val, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":812
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":813
 *     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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PLAssignStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_6, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":807
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":816
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateSchemaStmt", 0);

  /* "pglast/ast.pyx":817
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->schemaname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->schemaname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 817, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":818
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->authrole != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->authrole, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":819
 *     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(1, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 819, __pyx_L1_error)
  __pyx_v_v_schemaElts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":820
 *     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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":821
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateSchemaStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_schemaname, __pyx_v_v_authrole, __pyx_v_v_schemaElts, __pyx_v_v_if_not_exists};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":816
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":824
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableStmt", 0);

  /* "pglast/ast.pyx":825
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 825, __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":826
 * 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(1, 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(1, 826, __pyx_L1_error)
  __pyx_v_v_cmds = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":827
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":828
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":829
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AlterTableStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_relation, __pyx_v_v_cmds, __pyx_v_v_objtype, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":824
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":832
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableCmd", 0);

  /* "pglast/ast.pyx":833
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterTableType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_AlterTableType(__pyx_v_data->subtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_subtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":834
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 834, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __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_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":835
 *     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_PyLong_From_int16_t(__pyx_v_data->num); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_num = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":836
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->newowner != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->newowner, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __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_newowner = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":837
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->def != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->def, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __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_def_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":838
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":839
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":840
 *     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_PyBool_FromLong((!(!(__pyx_v_data->recurse != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_recurse = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":841
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterTableCmd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":832
 * 
 * 
 * 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":844
 * 
 * 
 * cdef create_ATAlterConstraint(structs.ATAlterConstraint* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_alterEnforceability = bool(data.alterEnforceability)
*/

static PyObject *__pyx_f_6pglast_6parser_create_ATAlterConstraint(ATAlterConstraint *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_conname = 0;
  PyObject *__pyx_v_v_alterEnforceability = 0;
  PyObject *__pyx_v_v_is_enforced = 0;
  PyObject *__pyx_v_v_alterDeferrability = 0;
  PyObject *__pyx_v_v_deferrable = 0;
  PyObject *__pyx_v_v_initdeferred = 0;
  PyObject *__pyx_v_v_alterInheritability = 0;
  PyObject *__pyx_v_v_noinherit = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ATAlterConstraint", 0);

  /* "pglast/ast.pyx":845
 * 
 * cdef create_ATAlterConstraint(structs.ATAlterConstraint* data, offset_to_index):
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_alterEnforceability = bool(data.alterEnforceability)
 *     cdef object v_is_enforced = bool(data.is_enforced)
*/
  __pyx_t_2 = (__pyx_v_data->conname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->conname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 845, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":846
 * cdef create_ATAlterConstraint(structs.ATAlterConstraint* data, offset_to_index):
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_alterEnforceability = bool(data.alterEnforceability)             # <<<<<<<<<<<<<<
 *     cdef object v_is_enforced = bool(data.is_enforced)
 *     cdef object v_alterDeferrability = bool(data.alterDeferrability)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->alterEnforceability != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_alterEnforceability = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":847
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_alterEnforceability = bool(data.alterEnforceability)
 *     cdef object v_is_enforced = bool(data.is_enforced)             # <<<<<<<<<<<<<<
 *     cdef object v_alterDeferrability = bool(data.alterDeferrability)
 *     cdef object v_deferrable = bool(data.deferrable)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->is_enforced != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_enforced = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":848
 *     cdef object v_alterEnforceability = bool(data.alterEnforceability)
 *     cdef object v_is_enforced = bool(data.is_enforced)
 *     cdef object v_alterDeferrability = bool(data.alterDeferrability)             # <<<<<<<<<<<<<<
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->alterDeferrability != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_alterDeferrability = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":849
 *     cdef object v_is_enforced = bool(data.is_enforced)
 *     cdef object v_alterDeferrability = bool(data.alterDeferrability)
 *     cdef object v_deferrable = bool(data.deferrable)             # <<<<<<<<<<<<<<
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_alterInheritability = bool(data.alterInheritability)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->deferrable != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferrable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":850
 *     cdef object v_alterDeferrability = bool(data.alterDeferrability)
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)             # <<<<<<<<<<<<<<
 *     cdef object v_alterInheritability = bool(data.alterInheritability)
 *     cdef object v_noinherit = bool(data.noinherit)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->initdeferred != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initdeferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":851
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_alterInheritability = bool(data.alterInheritability)             # <<<<<<<<<<<<<<
 *     cdef object v_noinherit = bool(data.noinherit)
 *     return ast.ATAlterConstraint(v_conname, v_alterEnforceability, v_is_enforced, v_alterDeferrability, v_deferrable, v_initdeferred, v_alterInheritability, v_noinherit)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->alterInheritability != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_alterInheritability = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":852
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_alterInheritability = bool(data.alterInheritability)
 *     cdef object v_noinherit = bool(data.noinherit)             # <<<<<<<<<<<<<<
 *     return ast.ATAlterConstraint(v_conname, v_alterEnforceability, v_is_enforced, v_alterDeferrability, v_deferrable, v_initdeferred, v_alterInheritability, v_noinherit)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->noinherit != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_noinherit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":853
 *     cdef object v_alterInheritability = bool(data.alterInheritability)
 *     cdef object v_noinherit = bool(data.noinherit)
 *     return ast.ATAlterConstraint(v_conname, v_alterEnforceability, v_is_enforced, v_alterDeferrability, v_deferrable, v_initdeferred, v_alterInheritability, v_noinherit)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ATAlterConstraint); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_5, __pyx_v_v_conname, __pyx_v_v_alterEnforceability, __pyx_v_v_is_enforced, __pyx_v_v_alterDeferrability, __pyx_v_v_deferrable, __pyx_v_v_initdeferred, __pyx_v_v_alterInheritability, __pyx_v_v_noinherit};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (9-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":844
 * 
 * 
 * cdef create_ATAlterConstraint(structs.ATAlterConstraint* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_conname = data.conname.decode("utf-8") if data.conname is not NULL else None
 *     cdef object v_alterEnforceability = bool(data.alterEnforceability)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_ATAlterConstraint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_conname);
  __Pyx_XDECREF(__pyx_v_v_alterEnforceability);
  __Pyx_XDECREF(__pyx_v_v_is_enforced);
  __Pyx_XDECREF(__pyx_v_v_alterDeferrability);
  __Pyx_XDECREF(__pyx_v_v_deferrable);
  __Pyx_XDECREF(__pyx_v_v_initdeferred);
  __Pyx_XDECREF(__pyx_v_v_alterInheritability);
  __Pyx_XDECREF(__pyx_v_v_noinherit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":856
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReplicaIdentityStmt", 0);

  /* "pglast/ast.pyx":857
 * 
 * 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 = PyUnicode_FromOrdinal(__pyx_v_data->identity_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_identity_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":858
 * 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_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 858, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":859
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReplicaIdentityStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_identity_type, __pyx_v_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":856
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":862
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterCollationStmt", 0);

  /* "pglast/ast.pyx":863
 * 
 * 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(1, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 863, __pyx_L1_error)
  __pyx_v_v_collname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":864
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterCollationStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_collname};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":862
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":867
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDomainStmt", 0);

  /* "pglast/ast.pyx":868
 * 
 * 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 = PyUnicode_FromOrdinal(__pyx_v_data->subtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_subtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":869
 * 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_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(1, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 869, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":870
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 870, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":871
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->def != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->def, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":872
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":873
 *     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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":874
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterDomainStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_7, __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_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (7-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":867
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":877
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  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":878
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->is_grant != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_grant = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":879
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GrantTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_GrantTargetType(__pyx_v_data->targtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_targtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":880
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":881
 *     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(1, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 881, __pyx_L1_error)
  __pyx_v_v_objects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":882
 *     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(1, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 882, __pyx_L1_error)
  __pyx_v_v_privileges = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":883
 *     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(1, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 883, __pyx_L1_error)
  __pyx_v_v_grantees = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":884
 *     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_PyBool_FromLong((!(!(__pyx_v_data->grant_option != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_grant_option = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":885
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->grantor != NULL);
  if (__pyx_t_6) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->grantor, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 885, __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_grantor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":886
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":887
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GrantStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (10-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":877
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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":890
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ObjectWithArgs", 0);

  /* "pglast/ast.pyx":891
 * 
 * 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(1, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 891, __pyx_L1_error)
  __pyx_v_v_objname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":892
 * 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(1, 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(1, 892, __pyx_L1_error)
  __pyx_v_v_objargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":893
 *     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(1, 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(1, 893, __pyx_L1_error)
  __pyx_v_v_objfuncargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":894
 *     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_PyBool_FromLong((!(!(__pyx_v_data->args_unspecified != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_args_unspecified = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":895
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectWithArgs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_v_objname, __pyx_v_v_objargs, __pyx_v_v_objfuncargs, __pyx_v_v_args_unspecified};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":890
 * 
 * 
 * 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_2);
  __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":898
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AccessPriv", 0);

  /* "pglast/ast.pyx":899
 * 
 * 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_2 = (__pyx_v_data->priv_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->priv_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 899, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":900
 * 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(1, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 900, __pyx_L1_error)
  __pyx_v_v_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":901
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AccessPriv); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_priv_name, __pyx_v_v_cols};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":898
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":904
 * 
 * 
 * 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_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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_GrantRoleStmt", 0);

  /* "pglast/ast.pyx":905
 * 
 * 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(1, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 905, __pyx_L1_error)
  __pyx_v_v_granted_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":906
 * 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 tuple v_opt = _pg_list_to_tuple(data.opt, offset_to_index)
*/
  __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(1, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 906, __pyx_L1_error)
  __pyx_v_v_grantee_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":907
 *     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 tuple v_opt = _pg_list_to_tuple(data.opt, offset_to_index)
 *     cdef object v_grantor = create(data.grantor, offset_to_index) if data.grantor is not NULL else None
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->is_grant != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_grant = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":908
 *     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 tuple v_opt = _pg_list_to_tuple(data.opt, offset_to_index)             # <<<<<<<<<<<<<<
 *     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_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->opt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 908, __pyx_L1_error)
  __pyx_v_v_opt = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":909
 *     cdef object v_is_grant = bool(data.is_grant)
 *     cdef tuple v_opt = _pg_list_to_tuple(data.opt, offset_to_index)
 *     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_opt, v_grantor, v_behavior)
*/
  __pyx_t_2 = (__pyx_v_data->grantor != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->grantor, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 909, __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":910
 *     cdef tuple v_opt = _pg_list_to_tuple(data.opt, offset_to_index)
 *     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_opt, v_grantor, v_behavior)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":911
 *     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_opt, v_grantor, v_behavior)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GrantRoleStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_5, __pyx_v_v_granted_roles, __pyx_v_v_grantee_roles, __pyx_v_v_is_grant, __pyx_v_v_opt, __pyx_v_v_grantor, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":904
 * 
 * 
 * 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_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":914
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDefaultPrivilegesStmt", 0);

  /* "pglast/ast.pyx":915
 * 
 * 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(1, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 915, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":916
 * 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_2 = (__pyx_v_data->action != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->action, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 916, __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_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":917
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AlterDefaultPrivilegesStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_options, __pyx_v_v_action};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":914
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":920
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CopyStmt", 0);

  /* "pglast/ast.pyx":921
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 921, __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":922
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->query != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 922, __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":923
 *     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(1, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 923, __pyx_L1_error)
  __pyx_v_v_attlist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":924
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_from != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_from = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":925
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_program != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_program = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":926
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->filename != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->filename;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 926, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 926, __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":927
 *     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(1, 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(1, 927, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":928
 *     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_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 928, __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":929
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CopyStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (9-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":920
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":932
 * 
 * 
 * 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_jumble_args = 0;
  PyObject *__pyx_v_v_is_local = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VariableSetStmt", 0);

  /* "pglast/ast.pyx":933
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_VariableSetKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_VariableSetKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":934
 * 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_jumble_args = bool(data.jumble_args)
*/
  __pyx_t_6 = (__pyx_v_data->name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 934, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 934, __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_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":935
 *     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_jumble_args = bool(data.jumble_args)
 *     cdef object v_is_local = bool(data.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(1, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 935, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":936
 *     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_jumble_args = bool(data.jumble_args)             # <<<<<<<<<<<<<<
 *     cdef object v_is_local = bool(data.is_local)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->jumble_args != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_jumble_args = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":937
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_jumble_args = bool(data.jumble_args)
 *     cdef object v_is_local = bool(data.is_local)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.VariableSetStmt(v_kind, v_name, v_args, v_jumble_args, v_is_local, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->is_local != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_local = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":938
 *     cdef object v_jumble_args = bool(data.jumble_args)
 *     cdef object v_is_local = bool(data.is_local)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.VariableSetStmt(v_kind, v_name, v_args, v_jumble_args, v_is_local, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":939
 *     cdef object v_is_local = bool(data.is_local)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.VariableSetStmt(v_kind, v_name, v_args, v_jumble_args, v_is_local, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableSetStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_v_kind, __pyx_v_v_name, __pyx_v_v_args, __pyx_v_v_jumble_args, __pyx_v_v_is_local, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":932
 * 
 * 
 * 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_jumble_args);
  __Pyx_XDECREF(__pyx_v_v_is_local);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":942
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VariableShowStmt", 0);

  /* "pglast/ast.pyx":943
 * 
 * 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_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 943, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":944
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableShowStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":942
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":947
 * 
 * 
 * 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_nnconstraints = 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateStmt", 0);

  /* "pglast/ast.pyx":948
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 948, __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":949
 * 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(1, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 949, __pyx_L1_error)
  __pyx_v_v_tableElts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":950
 *     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(1, 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(1, 950, __pyx_L1_error)
  __pyx_v_v_inhRelations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":951
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->partbound != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->partbound, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 951, __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_partbound = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":952
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->partspec != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->partspec, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 952, __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_partspec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":953
 *     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_nnconstraints = _pg_list_to_tuple(data.nnconstraints, offset_to_index)
*/
  __pyx_t_2 = (__pyx_v_data->ofTypename != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->ofTypename, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 953, __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_ofTypename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":954
 *     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_nnconstraints = _pg_list_to_tuple(data.nnconstraints, 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->constraints, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 954, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":955
 *     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_nnconstraints = _pg_list_to_tuple(data.nnconstraints, 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->nnconstraints, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 955, __pyx_L1_error)
  __pyx_v_v_nnconstraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":956
 *     cdef tuple v_constraints = _pg_list_to_tuple(data.constraints, offset_to_index)
 *     cdef tuple v_nnconstraints = _pg_list_to_tuple(data.nnconstraints, 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(1, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 956, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":957
 *     cdef tuple v_nnconstraints = _pg_list_to_tuple(data.nnconstraints, 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OnCommitAction); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_OnCommitAction(__pyx_v_data->oncommit); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_oncommit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":958
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->tablespacename != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->tablespacename;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 958, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":959
 *     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_nnconstraints, v_options, v_oncommit, v_tablespacename, v_accessMethod, v_if_not_exists)
*/
  __pyx_t_2 = (__pyx_v_data->accessMethod != NULL);
  if (__pyx_t_2) {
    __pyx_t_9 = __pyx_v_data->accessMethod;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 959, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":960
 *     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_nnconstraints, v_options, v_oncommit, v_tablespacename, v_accessMethod, v_if_not_exists)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":961
 *     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_nnconstraints, v_options, v_oncommit, v_tablespacename, v_accessMethod, v_if_not_exists)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CreateStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[14] = {__pyx_t_5, __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_nnconstraints, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (14-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":947
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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_nnconstraints);
  __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":964
 * 
 * 
 * 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_is_enforced = 0;
  PyObject *__pyx_v_v_skip_validation = 0;
  PyObject *__pyx_v_v_initially_valid = 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_generated_kind = 0;
  PyObject *__pyx_v_v_nulls_not_distinct = 0;
  PyObject *__pyx_v_v_keys = 0;
  PyObject *__pyx_v_v_without_overlaps = 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_with_period = 0;
  PyObject *__pyx_v_v_pk_with_period = 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_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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  char const *__pyx_t_10;
  char const *__pyx_t_11;
  char const *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Constraint", 0);

  /* "pglast/ast.pyx":965
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConstrType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ConstrType(__pyx_v_data->contype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_contype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":966
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->conname != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->conname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 966, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 966, __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_conname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":967
 *     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_is_enforced = bool(data.is_enforced)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->deferrable != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferrable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":968
 *     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_is_enforced = bool(data.is_enforced)
 *     cdef object v_skip_validation = bool(data.skip_validation)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->initdeferred != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initdeferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":969
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_is_enforced = bool(data.is_enforced)             # <<<<<<<<<<<<<<
 *     cdef object v_skip_validation = bool(data.skip_validation)
 *     cdef object v_initially_valid = bool(data.initially_valid)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->is_enforced != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_enforced = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":970
 *     cdef object v_initdeferred = bool(data.initdeferred)
 *     cdef object v_is_enforced = bool(data.is_enforced)
 *     cdef object v_skip_validation = bool(data.skip_validation)             # <<<<<<<<<<<<<<
 *     cdef object v_initially_valid = bool(data.initially_valid)
 *     cdef object v_is_no_inherit = bool(data.is_no_inherit)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->skip_validation != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skip_validation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":971
 *     cdef object v_is_enforced = bool(data.is_enforced)
 *     cdef object v_skip_validation = bool(data.skip_validation)
 *     cdef object v_initially_valid = bool(data.initially_valid)             # <<<<<<<<<<<<<<
 *     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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->initially_valid != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initially_valid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":972
 *     cdef object v_skip_validation = bool(data.skip_validation)
 *     cdef object v_initially_valid = bool(data.initially_valid)
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_no_inherit != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_no_inherit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":973
 *     cdef object v_initially_valid = bool(data.initially_valid)
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->raw_expr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->raw_expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 973, __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_raw_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":974
 *     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_generated_kind = chr(data.generated_kind)
*/
  __pyx_t_6 = (__pyx_v_data->cooked_expr != NULL);
  if (__pyx_t_6) {
    __pyx_t_9 = __pyx_v_data->cooked_expr;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 974, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 974, __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_cooked_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":975
 *     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_generated_kind = chr(data.generated_kind)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
*/
  __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_v_data->generated_when); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_generated_when = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":976
 *     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_generated_kind = chr(data.generated_kind)             # <<<<<<<<<<<<<<
 *     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 = PyUnicode_FromOrdinal(__pyx_v_data->generated_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_generated_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":977
 *     cdef object v_generated_when = chr(data.generated_when)
 *     cdef object v_generated_kind = chr(data.generated_kind)
 *     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 object v_without_overlaps = bool(data.without_overlaps)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->nulls_not_distinct != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nulls_not_distinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":978
 *     cdef object v_generated_kind = chr(data.generated_kind)
 *     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 object v_without_overlaps = bool(data.without_overlaps)
 *     cdef tuple v_including = _pg_list_to_tuple(data.including, offset_to_index)
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->keys, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 978, __pyx_L1_error)
  __pyx_v_v_keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":979
 *     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 object v_without_overlaps = bool(data.without_overlaps)             # <<<<<<<<<<<<<<
 *     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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->without_overlaps != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_without_overlaps = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":980
 *     cdef tuple v_keys = _pg_list_to_tuple(data.keys, offset_to_index)
 *     cdef object v_without_overlaps = bool(data.without_overlaps)
 *     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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->including, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 980, __pyx_L1_error)
  __pyx_v_v_including = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":981
 *     cdef object v_without_overlaps = bool(data.without_overlaps)
 *     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_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->exclusions, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 981, __pyx_L1_error)
  __pyx_v_v_exclusions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":982
 *     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_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(1, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 982, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":983
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->indexname != NULL);
  if (__pyx_t_6) {
    __pyx_t_10 = __pyx_v_data->indexname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_10); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 983, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_10, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 983, __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_indexname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":984
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->indexspace != NULL);
  if (__pyx_t_6) {
    __pyx_t_11 = __pyx_v_data->indexspace;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_11); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 984, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_11, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 984, __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_indexspace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":985
 *     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_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->reset_default_tblspc != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_reset_default_tblspc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":986
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->access_method != NULL);
  if (__pyx_t_6) {
    __pyx_t_12 = __pyx_v_data->access_method;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_12); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 986, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_12, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 986, __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_access_method = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":987
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->where_clause != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->where_clause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 987, __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_where_clause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":988
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->pktable != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->pktable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 988, __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_pktable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":989
 *     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_with_period = bool(data.fk_with_period)
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->fk_attrs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 989, __pyx_L1_error)
  __pyx_v_v_fk_attrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":990
 *     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_with_period = bool(data.fk_with_period)
 *     cdef object v_pk_with_period = bool(data.pk_with_period)
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->pk_attrs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 990, __pyx_L1_error)
  __pyx_v_v_pk_attrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":991
 *     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_with_period = bool(data.fk_with_period)             # <<<<<<<<<<<<<<
 *     cdef object v_pk_with_period = bool(data.pk_with_period)
 *     cdef object v_fk_matchtype = chr(data.fk_matchtype)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->fk_with_period != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_fk_with_period = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":992
 *     cdef tuple v_pk_attrs = _pg_list_to_tuple(data.pk_attrs, offset_to_index)
 *     cdef object v_fk_with_period = bool(data.fk_with_period)
 *     cdef object v_pk_with_period = bool(data.pk_with_period)             # <<<<<<<<<<<<<<
 *     cdef object v_fk_matchtype = chr(data.fk_matchtype)
 *     cdef object v_fk_upd_action = chr(data.fk_upd_action)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->pk_with_period != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_pk_with_period = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":993
 *     cdef object v_fk_with_period = bool(data.fk_with_period)
 *     cdef object v_pk_with_period = bool(data.pk_with_period)
 *     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_1 = PyUnicode_FromOrdinal(__pyx_v_data->fk_matchtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_fk_matchtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":994
 *     cdef object v_pk_with_period = bool(data.pk_with_period)
 *     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 = PyUnicode_FromOrdinal(__pyx_v_data->fk_upd_action); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_fk_upd_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":995
 *     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_1 = PyUnicode_FromOrdinal(__pyx_v_data->fk_del_action); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_fk_del_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":996
 *     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_location = offset_to_index(data.location)
*/
  __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(1, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 996, __pyx_L1_error)
  __pyx_v_v_fk_del_set_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":997
 *     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_location = offset_to_index(data.location)
 *     return ast.Constraint(v_contype, v_conname, v_deferrable, v_initdeferred, v_is_enforced, v_skip_validation, v_initially_valid, v_is_no_inherit, v_raw_expr, v_cooked_expr, v_generated_when, v_generated_kind, v_nulls_not_distinct, v_keys, v_without_overlaps, 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_with_period, v_pk_with_period, v_fk_matchtype, v_fk_upd_action, v_fk_del_action, v_fk_del_set_cols, v_old_conpfeqop, v_location)
*/
  __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(1, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 997, __pyx_L1_error)
  __pyx_v_v_old_conpfeqop = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":998
 *     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_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.Constraint(v_contype, v_conname, v_deferrable, v_initdeferred, v_is_enforced, v_skip_validation, v_initially_valid, v_is_no_inherit, v_raw_expr, v_cooked_expr, v_generated_when, v_generated_kind, v_nulls_not_distinct, v_keys, v_without_overlaps, 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_with_period, v_pk_with_period, v_fk_matchtype, v_fk_upd_action, v_fk_del_action, v_fk_del_set_cols, v_old_conpfeqop, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":999
 *     cdef tuple v_old_conpfeqop = _pg_list_to_tuple(data.old_conpfeqop, offset_to_index)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Constraint(v_contype, v_conname, v_deferrable, v_initdeferred, v_is_enforced, v_skip_validation, v_initially_valid, v_is_no_inherit, v_raw_expr, v_cooked_expr, v_generated_when, v_generated_kind, v_nulls_not_distinct, v_keys, v_without_overlaps, 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_with_period, v_pk_with_period, v_fk_matchtype, v_fk_upd_action, v_fk_del_action, v_fk_del_set_cols, v_old_conpfeqop, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[35] = {__pyx_t_3, __pyx_v_v_contype, __pyx_v_v_conname, __pyx_v_v_deferrable, __pyx_v_v_initdeferred, __pyx_v_v_is_enforced, __pyx_v_v_skip_validation, __pyx_v_v_initially_valid, __pyx_v_v_is_no_inherit, __pyx_v_v_raw_expr, __pyx_v_v_cooked_expr, __pyx_v_v_generated_when, __pyx_v_v_generated_kind, __pyx_v_v_nulls_not_distinct, __pyx_v_v_keys, __pyx_v_v_without_overlaps, __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_with_period, __pyx_v_v_pk_with_period, __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_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (35-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":964
 * 
 * 
 * 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_is_enforced);
  __Pyx_XDECREF(__pyx_v_v_skip_validation);
  __Pyx_XDECREF(__pyx_v_v_initially_valid);
  __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_generated_kind);
  __Pyx_XDECREF(__pyx_v_v_nulls_not_distinct);
  __Pyx_XDECREF(__pyx_v_v_keys);
  __Pyx_XDECREF(__pyx_v_v_without_overlaps);
  __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_with_period);
  __Pyx_XDECREF(__pyx_v_v_pk_with_period);
  __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_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1002
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTableSpaceStmt", 0);

  /* "pglast/ast.pyx":1003
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->tablespacename != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->tablespacename;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1003, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1004
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->owner != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->owner, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1005
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->location != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->location;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1005, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1006
 *     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(1, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1006, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1007
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CreateTableSpaceStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_tablespacename, __pyx_v_v_owner, __pyx_v_v_location, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1002
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1010
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropTableSpaceStmt", 0);

  /* "pglast/ast.pyx":1011
 * 
 * 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_2 = (__pyx_v_data->tablespacename != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->tablespacename;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1011, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1012
 * 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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1013
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DropTableSpaceStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_tablespacename, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1010
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1016
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableSpaceOptionsStmt", 0);

  /* "pglast/ast.pyx":1017
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->tablespacename != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->tablespacename;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1017, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1018
 * 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(1, 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(1, 1018, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1019
 *     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_PyBool_FromLong((!(!(__pyx_v_data->isReset != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isReset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1020
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterTableSpaceOptionsStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_tablespacename, __pyx_v_v_options, __pyx_v_v_isReset};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1016
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1023
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTableMoveAllStmt", 0);

  /* "pglast/ast.pyx":1024
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->orig_tablespacename != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->orig_tablespacename;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1024, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1025
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1026
 *     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(1, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1026, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1027
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->new_tablespacename != NULL);
  if (__pyx_t_2) {
    __pyx_t_9 = __pyx_v_data->new_tablespacename;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1027, __pyx_L1_error)
    __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":1028
 *     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_PyBool_FromLong((!(!(__pyx_v_data->nowait != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nowait = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1029
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterTableMoveAllStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_7, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1023
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1032
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateExtensionStmt", 0);

  /* "pglast/ast.pyx":1033
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->extname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->extname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1033, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1034
 * 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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1035
 *     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(1, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1035, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1036
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateExtensionStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_extname, __pyx_v_v_if_not_exists, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1032
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1039
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterExtensionStmt", 0);

  /* "pglast/ast.pyx":1040
 * 
 * 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_2 = (__pyx_v_data->extname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->extname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1040, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1041
 * 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(1, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1041, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1042
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterExtensionStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_extname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1039
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1045
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterExtensionContentsStmt", 0);

  /* "pglast/ast.pyx":1046
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->extname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->extname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1046, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1047
 * 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_PyLong_From_int(__pyx_v_data->action); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1048
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1049
 *     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_t_2 = (__pyx_v_data->object != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 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":1050
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterExtensionContentsStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_v_v_extname, __pyx_v_v_action, __pyx_v_v_objtype, __pyx_v_v_object};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1045
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1053
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateFdwStmt", 0);

  /* "pglast/ast.pyx":1054
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->fdwname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->fdwname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1054, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1055
 * 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(1, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1055, __pyx_L1_error)
  __pyx_v_v_func_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1056
 *     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(1, 1056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1056, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1057
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateFdwStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_fdwname, __pyx_v_v_func_options, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1053
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1060
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterFdwStmt", 0);

  /* "pglast/ast.pyx":1061
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->fdwname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->fdwname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1061, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1062
 * 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(1, 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(1, 1062, __pyx_L1_error)
  __pyx_v_v_func_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1063
 *     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(1, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1063, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1064
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterFdwStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_fdwname, __pyx_v_v_func_options, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1060
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1067
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateForeignServerStmt", 0);

  /* "pglast/ast.pyx":1068
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->servername != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->servername;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1068, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1069
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->servertype != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->servertype;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1069, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1070
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->version != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->version;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1070, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1071
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->fdwname != NULL);
  if (__pyx_t_2) {
    __pyx_t_8 = __pyx_v_data->fdwname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_8); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1071, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_8, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1072
 *     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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1073
 *     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(1, 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(1, 1073, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1074
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CreateForeignServerStmt); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_11 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
    __pyx_t_11 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_5, __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((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (7-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1067
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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":1077
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterForeignServerStmt", 0);

  /* "pglast/ast.pyx":1078
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->servername != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->servername;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1078, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1079
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->version != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->version;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1079, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1080
 *     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(1, 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(1, 1080, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1081
 *     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_PyBool_FromLong((!(!(__pyx_v_data->has_version != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_has_version = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1082
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_AlterForeignServerStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_servername, __pyx_v_v_version, __pyx_v_v_options, __pyx_v_v_has_version};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1077
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1085
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateForeignTableStmt", 0);

  /* "pglast/ast.pyx":1087
 * 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(1, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1088
 * 
 *     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_2 = (__pyx_v_data->servername != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->servername;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1088, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1089
 *     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(1, 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(1, 1089, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1090
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateForeignTableStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_base, __pyx_v_v_servername, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1085
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1093
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateUserMappingStmt", 0);

  /* "pglast/ast.pyx":1094
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->user != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->user, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1094, __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_user = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1095
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->servername != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->servername;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1095, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1095, __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":1096
 *     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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1097
 *     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(1, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1097, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1098
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateUserMappingStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_user, __pyx_v_v_servername, __pyx_v_v_if_not_exists, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1093
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1101
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterUserMappingStmt", 0);

  /* "pglast/ast.pyx":1102
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->user != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->user, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1102, __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_user = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1103
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->servername != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->servername;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1103, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1103, __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":1104
 *     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(1, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1104, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1105
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterUserMappingStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_user, __pyx_v_v_servername, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1101
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1108
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropUserMappingStmt", 0);

  /* "pglast/ast.pyx":1109
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->user != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->user, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1109, __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_user = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1110
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->servername != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->servername;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1110, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1110, __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":1111
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1112
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DropUserMappingStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_user, __pyx_v_v_servername, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1108
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1115
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ImportForeignSchemaStmt", 0);

  /* "pglast/ast.pyx":1116
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->server_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->server_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1116, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1117
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->remote_schema != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->remote_schema;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1117, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1118
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->local_schema != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->local_schema;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1118, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1119
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_GetAttr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ImportForeignSchemaType); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyLong_From_ImportForeignSchemaType(__pyx_v_data->list_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_10 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_list_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1120
 *     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(1, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1120, __pyx_L1_error)
  __pyx_v_v_table_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1121
 *     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(1, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1121, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1122
 *     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_t_9 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ImportForeignSchemaStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_10 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_10 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_9, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_10, (7-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1115
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":1125
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatePolicyStmt", 0);

  /* "pglast/ast.pyx":1126
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->policy_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->policy_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1126, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1127
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->table != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->table, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1128
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->cmd_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->cmd_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1128, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1129
 *     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_PyBool_FromLong((!(!(__pyx_v_data->permissive != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_permissive = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1130
 *     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(1, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1130, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1131
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->qual != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1132
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->with_check != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->with_check, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1133
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CreatePolicyStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_5, __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((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (8-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1125
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1136
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterPolicyStmt", 0);

  /* "pglast/ast.pyx":1137
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->policy_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->policy_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1137, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1138
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->table != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->table, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1139
 *     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(1, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1139, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1140
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->qual != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1141
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->with_check != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->with_check, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1142
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterPolicyStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_5, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1136
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1145
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateAmStmt", 0);

  /* "pglast/ast.pyx":1146
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->amname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->amname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1146, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1147
 * 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(1, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1147, __pyx_L1_error)
  __pyx_v_v_handler_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1148
 *     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 = PyUnicode_FromOrdinal(__pyx_v_data->amtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_amtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1149
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateAmStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_amname, __pyx_v_v_handler_name, __pyx_v_v_amtype};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1145
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1152
 * 
 * 
 * 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;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTrigStmt", 0);

  /* "pglast/ast.pyx":1153
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1154
 * 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_PyBool_FromLong((!(!(__pyx_v_data->isconstraint != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isconstraint = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1155
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->trigname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->trigname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1155, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1156
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1157
 *     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(1, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1157, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1158
 *     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(1, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1158, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1159
 *     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_PyBool_FromLong((!(!(__pyx_v_data->row != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_row = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1160
 *     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_PyLong_From_int16_t(__pyx_v_data->timing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_timing = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1161
 *     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_PyLong_From_int16_t(__pyx_v_data->events); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_events = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1162
 *     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(1, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1162, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1163
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->whenClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whenClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1164
 *     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(1, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1164, __pyx_L1_error)
  __pyx_v_v_transitionRels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1165
 *     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_PyBool_FromLong((!(!(__pyx_v_data->deferrable != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferrable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1166
 *     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_PyBool_FromLong((!(!(__pyx_v_data->initdeferred != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initdeferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1167
 *     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_2 = (__pyx_v_data->constrrel != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->constrrel, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1168
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateTrigStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[16] = {__pyx_t_5, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (16-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1152
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1171
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateEventTrigStmt", 0);

  /* "pglast/ast.pyx":1172
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->trigname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->trigname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1172, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1173
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->eventname != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->eventname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1173, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1174
 *     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(1, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1174, __pyx_L1_error)
  __pyx_v_v_whenclause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1175
 *     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(1, 1175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1175, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1176
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CreateEventTrigStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_trigname, __pyx_v_v_eventname, __pyx_v_v_whenclause, __pyx_v_v_funcname};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1171
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1179
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterEventTrigStmt", 0);

  /* "pglast/ast.pyx":1180
 * 
 * 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_2 = (__pyx_v_data->trigname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->trigname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1180, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1181
 * 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 = PyUnicode_FromOrdinal(__pyx_v_data->tgenabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_tgenabled = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1182
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterEventTrigStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_trigname, __pyx_v_v_tgenabled};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1179
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1185
 * 
 * 
 * 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;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatePLangStmt", 0);

  /* "pglast/ast.pyx":1186
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1187
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->plname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->plname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1187, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1188
 *     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(1, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1188, __pyx_L1_error)
  __pyx_v_v_plhandler = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1189
 *     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(1, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1189, __pyx_L1_error)
  __pyx_v_v_plinline = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1190
 *     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(1, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1190, __pyx_L1_error)
  __pyx_v_v_plvalidator = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1191
 *     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_PyBool_FromLong((!(!(__pyx_v_data->pltrusted != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_pltrusted = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1192
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreatePLangStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_5, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (7-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1185
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1195
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateRoleStmt", 0);

  /* "pglast/ast.pyx":1196
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RoleStmtType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_RoleStmtType(__pyx_v_data->stmt_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_stmt_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1197
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->role != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->role;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1197, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1197, __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_role = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1198
 *     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(1, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1198, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1199
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CreateRoleStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_stmt_type, __pyx_v_v_role, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1195
 * 
 * 
 * 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":1202
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterRoleStmt", 0);

  /* "pglast/ast.pyx":1203
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->role != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->role, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1203, __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_role = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1204
 * 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(1, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1204, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1205
 *     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_PyLong_From_int(__pyx_v_data->action); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1206
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AlterRoleStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_role, __pyx_v_v_options, __pyx_v_v_action};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1202
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1209
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterRoleSetStmt", 0);

  /* "pglast/ast.pyx":1210
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->role != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->role, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1210, __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_role = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1211
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->database != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->database;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1211, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1211, __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_database = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1212
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->setstmt != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setstmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1212, __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":1213
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterRoleSetStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_role, __pyx_v_v_database, __pyx_v_v_setstmt};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1209
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1216
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropRoleStmt", 0);

  /* "pglast/ast.pyx":1217
 * 
 * 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(1, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1217, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1218
 * 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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 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 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropRoleStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_roles, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1216
 * 
 * 
 * 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_2);
  __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":1222
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateSeqStmt", 0);

  /* "pglast/ast.pyx":1223
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->sequence != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sequence, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1223, __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_sequence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1224
 * 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(1, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1224, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1225
 *     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_PyBool_FromLong((!(!(__pyx_v_data->for_identity != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_identity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1226
 *     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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1227
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CreateSeqStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1222
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1230
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterSeqStmt", 0);

  /* "pglast/ast.pyx":1231
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->sequence != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sequence, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1231, __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_sequence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1232
 * 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(1, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1232, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1233
 *     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_PyBool_FromLong((!(!(__pyx_v_data->for_identity != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_identity = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1234
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1235
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AlterSeqStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_sequence, __pyx_v_v_options, __pyx_v_v_for_identity, __pyx_v_v_missing_ok};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1230
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1238
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DefineStmt", 0);

  /* "pglast/ast.pyx":1239
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1240
 * 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_PyBool_FromLong((!(!(__pyx_v_data->oldstyle != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_oldstyle = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1241
 *     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(1, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1241, __pyx_L1_error)
  __pyx_v_v_defnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1242
 *     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(1, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1242, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1243
 *     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(1, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1243, __pyx_L1_error)
  __pyx_v_v_definition = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1244
 *     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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1245
 *     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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1246
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DefineStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1238
 * 
 * 
 * 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":1249
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateDomainStmt", 0);

  /* "pglast/ast.pyx":1250
 * 
 * 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(1, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1250, __pyx_L1_error)
  __pyx_v_v_domainname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1251
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->typeName != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typeName, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1251, __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":1252
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->collClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->collClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1252, __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_collClause = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1253
 *     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(1, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1253, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1254
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CreateDomainStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_domainname, __pyx_v_v_typeName, __pyx_v_v_collClause, __pyx_v_v_constraints};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1249
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1257
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateOpClassStmt", 0);

  /* "pglast/ast.pyx":1258
 * 
 * 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(1, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1258, __pyx_L1_error)
  __pyx_v_v_opclassname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1259
 * 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(1, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1259, __pyx_L1_error)
  __pyx_v_v_opfamilyname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1260
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->amname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->amname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1260, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1261
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->datatype != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->datatype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1262
 *     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(1, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1262, __pyx_L1_error)
  __pyx_v_v_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1263
 *     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_PyBool_FromLong((!(!(__pyx_v_data->isDefault != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isDefault = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1264
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateOpClassStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_5, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (7-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1257
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1267
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateOpClassItem", 0);

  /* "pglast/ast.pyx":1268
 * 
 * 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_PyLong_From_int(__pyx_v_data->itemtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_itemtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1269
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->name, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1269, __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_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1270
 *     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_PyLong_From_int(__pyx_v_data->number); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_number = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1271
 *     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(1, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1271, __pyx_L1_error)
  __pyx_v_v_order_family = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1272
 *     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(1, 1272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1272, __pyx_L1_error)
  __pyx_v_v_class_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1273
 *     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_2 = (__pyx_v_data->storedtype != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->storedtype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1273, __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_storedtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1274
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CreateOpClassItem); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1267
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1277
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateOpFamilyStmt", 0);

  /* "pglast/ast.pyx":1278
 * 
 * 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(1, 1278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1278, __pyx_L1_error)
  __pyx_v_v_opfamilyname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1279
 * 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_2 = (__pyx_v_data->amname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->amname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1279, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1280
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateOpFamilyStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_opfamilyname, __pyx_v_v_amname};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1277
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1283
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterOpFamilyStmt", 0);

  /* "pglast/ast.pyx":1284
 * 
 * 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(1, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1284, __pyx_L1_error)
  __pyx_v_v_opfamilyname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1285
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->amname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->amname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1285, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1286
 *     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_PyBool_FromLong((!(!(__pyx_v_data->isDrop != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isDrop = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1287
 *     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(1, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1287, __pyx_L1_error)
  __pyx_v_v_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1288
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterOpFamilyStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_opfamilyname, __pyx_v_v_amname, __pyx_v_v_isDrop, __pyx_v_v_items};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1283
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1291
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropStmt", 0);

  /* "pglast/ast.pyx":1292
 * 
 * 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(1, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1292, __pyx_L1_error)
  __pyx_v_v_objects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1293
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->removeType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_removeType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1294
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1295
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1296
 *     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_PyBool_FromLong((!(!(__pyx_v_data->concurrent != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_concurrent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1297
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1291
 * 
 * 
 * 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":1300
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TruncateStmt", 0);

  /* "pglast/ast.pyx":1301
 * 
 * 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(1, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1301, __pyx_L1_error)
  __pyx_v_v_relations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1302
 * 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_PyBool_FromLong((!(!(__pyx_v_data->restart_seqs != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_restart_seqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1303
 *     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_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1304
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_TruncateStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1300
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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":1307
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CommentStmt", 0);

  /* "pglast/ast.pyx":1308
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1309
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->object != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1309, __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":1310
 *     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)
 * 
*/
  __pyx_t_6 = (__pyx_v_data->comment != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->comment;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1310, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1310, __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_comment = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1311
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CommentStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_objtype, __pyx_v_v_object, __pyx_v_v_comment};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1307
 * 
 * 
 * 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":1314
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SecLabelStmt", 0);

  /* "pglast/ast.pyx":1315
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1316
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->object != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1316, __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":1317
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->provider != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->provider;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1317, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1317, __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_provider = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1318
 *     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)
 * 
*/
  __pyx_t_6 = (__pyx_v_data->label != NULL);
  if (__pyx_t_6) {
    __pyx_t_9 = __pyx_v_data->label;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1318, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1318, __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_label = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1319
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SecLabelStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_objtype, __pyx_v_v_object, __pyx_v_v_provider, __pyx_v_v_label};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1314
 * 
 * 
 * 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":1322
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DeclareCursorStmt", 0);

  /* "pglast/ast.pyx":1323
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->portalname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->portalname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1323, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1324
 * 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_PyLong_From_int(__pyx_v_data->options); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_options = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1325
 *     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_2 = (__pyx_v_data->query != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1326
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DeclareCursorStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_portalname, __pyx_v_v_options, __pyx_v_v_query};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1322
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1329
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ClosePortalStmt", 0);

  /* "pglast/ast.pyx":1330
 * 
 * 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_t_2 = (__pyx_v_data->portalname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->portalname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1330, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1331
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ClosePortalStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_portalname};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1329
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1334
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FetchStmt", 0);

  /* "pglast/ast.pyx":1335
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FetchDirection); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_FetchDirection(__pyx_v_data->direction); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_direction = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1336
 * 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_PyLong_From_long(__pyx_v_data->howMany); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_howMany = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1337
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->portalname != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->portalname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1337, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1337, __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_portalname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1338
 *     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_PyBool_FromLong((!(!(__pyx_v_data->ismove != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ismove = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1339
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FetchStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_direction, __pyx_v_v_howMany, __pyx_v_v_portalname, __pyx_v_v_ismove};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1334
 * 
 * 
 * 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":1342
 * 
 * 
 * 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_oldNumber = 0;
  PyObject *__pyx_v_v_oldCreateSubid = 0;
  PyObject *__pyx_v_v_oldFirstRelfilelocatorSubid = 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_iswithoutoverlaps = 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_IndexStmt", 0);

  /* "pglast/ast.pyx":1343
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->idxname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->idxname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1343, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1344
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1345
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->accessMethod != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->accessMethod;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1345, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1346
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->tableSpace != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->tableSpace;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1346, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1347
 *     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(1, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1347, __pyx_L1_error)
  __pyx_v_v_indexParams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1348
 *     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(1, 1348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1348, __pyx_L1_error)
  __pyx_v_v_indexIncludingParams = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1349
 *     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(1, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1349, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1350
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1351
 *     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_oldNumber = data.oldNumber
*/
  __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(1, 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(1, 1351, __pyx_L1_error)
  __pyx_v_v_excludeOpNames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1352
 *     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_oldNumber = data.oldNumber
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
*/
  __pyx_t_2 = (__pyx_v_data->idxcomment != NULL);
  if (__pyx_t_2) {
    __pyx_t_8 = __pyx_v_data->idxcomment;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_8); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1352, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_8, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1353
 *     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_oldNumber = data.oldNumber             # <<<<<<<<<<<<<<
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
 *     cdef object v_oldFirstRelfilelocatorSubid = data.oldFirstRelfilelocatorSubid
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->oldNumber); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_oldNumber = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1354
 *     cdef object v_idxcomment = data.idxcomment.decode("utf-8") if data.idxcomment is not NULL else None
 *     cdef object v_oldNumber = data.oldNumber
 *     cdef object v_oldCreateSubid = data.oldCreateSubid             # <<<<<<<<<<<<<<
 *     cdef object v_oldFirstRelfilelocatorSubid = data.oldFirstRelfilelocatorSubid
 *     cdef object v_unique = bool(data.unique)
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->oldCreateSubid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_oldCreateSubid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1355
 *     cdef object v_oldNumber = data.oldNumber
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
 *     cdef object v_oldFirstRelfilelocatorSubid = data.oldFirstRelfilelocatorSubid             # <<<<<<<<<<<<<<
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_nulls_not_distinct = bool(data.nulls_not_distinct)
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->oldFirstRelfilelocatorSubid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_oldFirstRelfilelocatorSubid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1356
 *     cdef object v_oldCreateSubid = data.oldCreateSubid
 *     cdef object v_oldFirstRelfilelocatorSubid = data.oldFirstRelfilelocatorSubid
 *     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_PyBool_FromLong((!(!(__pyx_v_data->unique != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unique = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1357
 *     cdef object v_oldFirstRelfilelocatorSubid = data.oldFirstRelfilelocatorSubid
 *     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_PyBool_FromLong((!(!(__pyx_v_data->nulls_not_distinct != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nulls_not_distinct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1358
 *     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_iswithoutoverlaps = bool(data.iswithoutoverlaps)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->primary != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_primary = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1359
 *     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_iswithoutoverlaps = bool(data.iswithoutoverlaps)
 *     cdef object v_deferrable = bool(data.deferrable)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->isconstraint != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isconstraint = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1360
 *     cdef object v_primary = bool(data.primary)
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_iswithoutoverlaps = bool(data.iswithoutoverlaps)             # <<<<<<<<<<<<<<
 *     cdef object v_deferrable = bool(data.deferrable)
 *     cdef object v_initdeferred = bool(data.initdeferred)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->iswithoutoverlaps != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_iswithoutoverlaps = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1361
 *     cdef object v_isconstraint = bool(data.isconstraint)
 *     cdef object v_iswithoutoverlaps = bool(data.iswithoutoverlaps)
 *     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_PyBool_FromLong((!(!(__pyx_v_data->deferrable != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferrable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1362
 *     cdef object v_iswithoutoverlaps = bool(data.iswithoutoverlaps)
 *     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_PyBool_FromLong((!(!(__pyx_v_data->initdeferred != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_initdeferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1363
 *     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_PyBool_FromLong((!(!(__pyx_v_data->transformed != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_transformed = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1364
 *     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_PyBool_FromLong((!(!(__pyx_v_data->concurrent != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_concurrent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1365
 *     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_oldNumber, v_oldCreateSubid, v_oldFirstRelfilelocatorSubid, v_unique, v_nulls_not_distinct, v_primary, v_isconstraint, v_iswithoutoverlaps, v_deferrable, v_initdeferred, v_transformed, v_concurrent, v_if_not_exists, v_reset_default_tblspc)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1366
 *     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_oldNumber, v_oldCreateSubid, v_oldFirstRelfilelocatorSubid, v_unique, v_nulls_not_distinct, v_primary, v_isconstraint, v_iswithoutoverlaps, v_deferrable, v_initdeferred, v_transformed, v_concurrent, v_if_not_exists, v_reset_default_tblspc)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->reset_default_tblspc != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_reset_default_tblspc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1367
 *     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_oldNumber, v_oldCreateSubid, v_oldFirstRelfilelocatorSubid, v_unique, v_nulls_not_distinct, v_primary, v_isconstraint, v_iswithoutoverlaps, v_deferrable, v_initdeferred, v_transformed, v_concurrent, v_if_not_exists, v_reset_default_tblspc)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_IndexStmt); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_11 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
    __pyx_t_11 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[25] = {__pyx_t_5, __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_oldNumber, __pyx_v_v_oldCreateSubid, __pyx_v_v_oldFirstRelfilelocatorSubid, __pyx_v_v_unique, __pyx_v_v_nulls_not_distinct, __pyx_v_v_primary, __pyx_v_v_isconstraint, __pyx_v_v_iswithoutoverlaps, __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((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_11, (25-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1342
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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_oldNumber);
  __Pyx_XDECREF(__pyx_v_v_oldCreateSubid);
  __Pyx_XDECREF(__pyx_v_v_oldFirstRelfilelocatorSubid);
  __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_iswithoutoverlaps);
  __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":1370
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateStatsStmt", 0);

  /* "pglast/ast.pyx":1371
 * 
 * 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(1, 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(1, 1371, __pyx_L1_error)
  __pyx_v_v_defnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1372
 * 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(1, 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(1, 1372, __pyx_L1_error)
  __pyx_v_v_stat_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1373
 *     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(1, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1373, __pyx_L1_error)
  __pyx_v_v_exprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1374
 *     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(1, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1374, __pyx_L1_error)
  __pyx_v_v_relations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1375
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->stxcomment != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->stxcomment;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1375, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1376
 *     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_PyBool_FromLong((!(!(__pyx_v_data->transformed != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_transformed = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1377
 *     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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1378
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateStatsStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_5, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (8-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1370
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1381
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_StatsElem", 0);

  /* "pglast/ast.pyx":1382
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1382, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1383
 * 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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1384
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_StatsElem); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_name, __pyx_v_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1381
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1387
 * 
 * 
 * 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 = create(data.stxstattarget, offset_to_index) if data.stxstattarget is not NULL else None
*/

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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterStatsStmt", 0);

  /* "pglast/ast.pyx":1388
 * 
 * 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 = create(data.stxstattarget, offset_to_index) if data.stxstattarget is not NULL else None
 *     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(1, 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(1, 1388, __pyx_L1_error)
  __pyx_v_v_defnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1389
 * 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 = create(data.stxstattarget, offset_to_index) if data.stxstattarget is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterStatsStmt(v_defnames, v_stxstattarget, v_missing_ok)
*/
  __pyx_t_2 = (__pyx_v_data->stxstattarget != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->stxstattarget, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1389, __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_stxstattarget = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1390
 *     cdef tuple v_defnames = _pg_list_to_tuple(data.defnames, offset_to_index)
 *     cdef object v_stxstattarget = create(data.stxstattarget, offset_to_index) if data.stxstattarget is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)             # <<<<<<<<<<<<<<
 *     return ast.AlterStatsStmt(v_defnames, v_stxstattarget, v_missing_ok)
 * 
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1391
 *     cdef object v_stxstattarget = create(data.stxstattarget, offset_to_index) if data.stxstattarget is not NULL else None
 *     cdef object v_missing_ok = bool(data.missing_ok)
 *     return ast.AlterStatsStmt(v_defnames, v_stxstattarget, v_missing_ok)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AlterStatsStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1387
 * 
 * 
 * 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 = create(data.stxstattarget, offset_to_index) if data.stxstattarget 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_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":1394
 * 
 * 
 * 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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateFunctionStmt", 0);

  /* "pglast/ast.pyx":1395
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->is_procedure != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_procedure = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1396
 * 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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1397
 *     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(1, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1397, __pyx_L1_error)
  __pyx_v_v_funcname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1398
 *     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(1, 1398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1398, __pyx_L1_error)
  __pyx_v_v_parameters = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1399
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->returnType != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returnType, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1399, __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":1400
 *     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(1, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1400, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1401
 *     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_2 = (__pyx_v_data->sql_body != NULL);
  if (__pyx_t_2) {
    __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(1, 1401, __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":1402
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CreateFunctionStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (8-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1394
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __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":1405
 * 
 * 
 * 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_v_v_location = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FunctionParameter", 0);

  /* "pglast/ast.pyx":1406
 * 
 * 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))
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1406, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1407
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->argType != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->argType, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1408
 *     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
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FunctionParameterMode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyUnicode_FromOrdinal(__pyx_v_data->mode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_mode = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1409
 *     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             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.FunctionParameter(v_name, v_argType, v_mode, v_defexpr, v_location)
*/
  __pyx_t_2 = (__pyx_v_data->defexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_f_6pglast_6parser_create(__pyx_v_data->defexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 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":1410
 *     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
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.FunctionParameter(v_name, v_argType, v_mode, v_defexpr, v_location)
 * 
*/
  __pyx_t_7 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1411
 *     cdef object v_defexpr = create(data.defexpr, offset_to_index) if data.defexpr is not NULL else None
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.FunctionParameter(v_name, v_argType, v_mode, v_defexpr, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionParameter); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_6, __pyx_v_v_name, __pyx_v_v_argType, __pyx_v_v_mode, __pyx_v_v_defexpr, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1405
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1414
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterFunctionStmt", 0);

  /* "pglast/ast.pyx":1415
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1416
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->func != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->func, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1416, __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_func = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1417
 *     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(1, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1417, __pyx_L1_error)
  __pyx_v_v_actions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1418
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterFunctionStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_objtype, __pyx_v_v_func, __pyx_v_v_actions};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1414
 * 
 * 
 * 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":1421
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DoStmt", 0);

  /* "pglast/ast.pyx":1422
 * 
 * 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(1, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1422, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1423
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DoStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_args};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1421
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":1426
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InlineCodeBlock", 0);

  /* "pglast/ast.pyx":1427
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->source_text != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->source_text;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1427, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1428
 * 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_PyBool_FromLong((!(!(__pyx_v_data->langIsTrusted != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_langIsTrusted = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1429
 *     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_PyBool_FromLong((!(!(__pyx_v_data->atomic != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_atomic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1430
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_InlineCodeBlock); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_source_text, __pyx_v_v_langIsTrusted, __pyx_v_v_atomic};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1426
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1433
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CallStmt", 0);

  /* "pglast/ast.pyx":1434
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->funccall != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->funccall, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1434, __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_funccall = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1435
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->funcexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->funcexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1435, __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_funcexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1436
 *     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(1, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1436, __pyx_L1_error)
  __pyx_v_v_outargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1437
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CallStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_funccall, __pyx_v_v_funcexpr, __pyx_v_v_outargs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1433
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1440
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CallContext", 0);

  /* "pglast/ast.pyx":1441
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->atomic != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_atomic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1442
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CallContext); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_atomic};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1440
 * 
 * 
 * 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_2);
  __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":1445
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RenameStmt", 0);

  /* "pglast/ast.pyx":1446
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->renameType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_renameType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1447
 * 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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->relationType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_relationType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1448
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_6) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1448, __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":1449
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->object != NULL);
  if (__pyx_t_6) {
    __pyx_t_2 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1449, __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":1450
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->subname != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->subname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1450, __pyx_L1_error)
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1450, __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":1451
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->newname != NULL);
  if (__pyx_t_6) {
    __pyx_t_9 = __pyx_v_data->newname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1451, __pyx_L1_error)
    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1451, __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":1452
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1453
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1454
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RenameStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1445
 * 
 * 
 * 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":1457
 * 
 * 
 * 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;
  size_t __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":1458
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objectType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1459
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1459, __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":1460
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->object != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1460, __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":1461
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->extname != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->extname, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1461, __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_extname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1462
 *     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_PyBool_FromLong((!(!(__pyx_v_data->remove != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_remove = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1463
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterObjectDependsStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1457
 * 
 * 
 * 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":1466
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterObjectSchemaStmt", 0);

  /* "pglast/ast.pyx":1467
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objectType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1468
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1468, __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":1469
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->object != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1469, __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":1470
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->newschema != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->newschema;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1470, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1470, __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_newschema = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1471
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1472
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterObjectSchemaStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1466
 * 
 * 
 * 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":1475
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterOwnerStmt", 0);

  /* "pglast/ast.pyx":1476
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objectType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objectType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1477
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1477, __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":1478
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->object != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->object, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1478, __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":1479
 *     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)
 * 
*/
  __pyx_t_6 = (__pyx_v_data->newowner != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->newowner, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1479, __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_newowner = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1480
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterOwnerStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_objectType, __pyx_v_v_relation, __pyx_v_v_object, __pyx_v_v_newowner};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1475
 * 
 * 
 * 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":1483
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterOperatorStmt", 0);

  /* "pglast/ast.pyx":1484
 * 
 * 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_2 = (__pyx_v_data->opername != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->opername, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1484, __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_opername = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1485
 * 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(1, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1485, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1486
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AlterOperatorStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_opername, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1483
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1489
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTypeStmt", 0);

  /* "pglast/ast.pyx":1490
 * 
 * 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(1, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1490, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1491
 * 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(1, 1491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1491, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1492
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterTypeStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_typeName, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1489
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":1495
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RuleStmt", 0);

  /* "pglast/ast.pyx":1496
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1496, __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":1497
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->rulename != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->rulename;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1497, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1497, __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_rulename = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1498
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1498, __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":1499
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CmdType); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_CmdType(__pyx_v_data->event); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_event = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1500
 *     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_PyBool_FromLong((!(!(__pyx_v_data->instead != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_instead = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1501
 *     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(1, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1501, __pyx_L1_error)
  __pyx_v_v_actions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1502
 *     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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1503
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_RuleStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_7, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (8-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1495
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1506
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_NotifyStmt", 0);

  /* "pglast/ast.pyx":1507
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->conditionname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->conditionname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1507, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1508
 * 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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->payload != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->payload;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1508, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1509
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NotifyStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_conditionname, __pyx_v_v_payload};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1506
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1512
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ListenStmt", 0);

  /* "pglast/ast.pyx":1513
 * 
 * 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_t_2 = (__pyx_v_data->conditionname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->conditionname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1513, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1514
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ListenStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_conditionname};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1512
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1517
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_UnlistenStmt", 0);

  /* "pglast/ast.pyx":1518
 * 
 * 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_t_2 = (__pyx_v_data->conditionname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->conditionname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1518, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1519
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_UnlistenStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_conditionname};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1517
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1522
 * 
 * 
 * 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_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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TransactionStmt", 0);

  /* "pglast/ast.pyx":1523
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_TransactionStmtKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_TransactionStmtKind(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1524
 * 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(1, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1524, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1525
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->savepoint_name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->savepoint_name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1525, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1525, __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_savepoint_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1526
 *     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)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_6 = (__pyx_v_data->gid != NULL);
  if (__pyx_t_6) {
    __pyx_t_9 = __pyx_v_data->gid;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1526, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1526, __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_gid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1527
 *     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)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TransactionStmt(v_kind, v_options, v_savepoint_name, v_gid, v_chain, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->chain != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_chain = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1528
 *     cdef object v_gid = data.gid.decode("utf-8") if data.gid is not NULL else None
 *     cdef object v_chain = bool(data.chain)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.TransactionStmt(v_kind, v_options, v_savepoint_name, v_gid, v_chain, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1529
 *     cdef object v_chain = bool(data.chain)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TransactionStmt(v_kind, v_options, v_savepoint_name, v_gid, v_chain, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TransactionStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__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_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1522
 * 
 * 
 * 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_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1532
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CompositeTypeStmt", 0);

  /* "pglast/ast.pyx":1533
 * 
 * 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_2 = (__pyx_v_data->typevar != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->typevar, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1533, __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_typevar = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1534
 * 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(1, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1534, __pyx_L1_error)
  __pyx_v_v_coldeflist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1535
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CompositeTypeStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_typevar, __pyx_v_v_coldeflist};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1532
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1538
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateEnumStmt", 0);

  /* "pglast/ast.pyx":1539
 * 
 * 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(1, 1539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1539, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1540
 * 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(1, 1540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1540, __pyx_L1_error)
  __pyx_v_v_vals = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1541
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CreateEnumStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_typeName, __pyx_v_v_vals};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1538
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":1544
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateRangeStmt", 0);

  /* "pglast/ast.pyx":1545
 * 
 * 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(1, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1545, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1546
 * 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(1, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1546, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1547
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CreateRangeStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_typeName, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1544
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":1550
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterEnumStmt", 0);

  /* "pglast/ast.pyx":1551
 * 
 * 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(1, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1551, __pyx_L1_error)
  __pyx_v_v_typeName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1552
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->oldVal != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->oldVal;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1552, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1553
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->newVal != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->newVal;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1553, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1554
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->newValNeighbor != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->newValNeighbor;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1554, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1555
 *     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_PyBool_FromLong((!(!(__pyx_v_data->newValIsAfter != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_newValIsAfter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1556
 *     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_PyBool_FromLong((!(!(__pyx_v_data->skipIfNewValExists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skipIfNewValExists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1557
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_AlterEnumStmt); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_10 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_10 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_5, __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((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (7-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1550
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":1560
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ViewStmt", 0);

  /* "pglast/ast.pyx":1561
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->view != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->view, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1561, __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_view = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1562
 * 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(1, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1562, __pyx_L1_error)
  __pyx_v_v_aliases = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1563
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->query != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1563, __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":1564
 *     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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1565
 *     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(1, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1565, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1566
 *     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_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ViewCheckOption); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_ViewCheckOption(__pyx_v_data->withCheckOption); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_withCheckOption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1567
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ViewStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_5, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1560
 * 
 * 
 * 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_3);
  __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":1570
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_LoadStmt", 0);

  /* "pglast/ast.pyx":1571
 * 
 * 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_t_2 = (__pyx_v_data->filename != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->filename;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1571, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1572
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_LoadStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_filename};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1570
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1575
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatedbStmt", 0);

  /* "pglast/ast.pyx":1576
 * 
 * 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_2 = (__pyx_v_data->dbname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->dbname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1576, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1577
 * 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(1, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1577, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1578
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreatedbStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_dbname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1575
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1581
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDatabaseStmt", 0);

  /* "pglast/ast.pyx":1582
 * 
 * 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_2 = (__pyx_v_data->dbname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->dbname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1582, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1583
 * 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(1, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1583, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1584
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterDatabaseStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_dbname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1581
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1587
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDatabaseRefreshCollStmt", 0);

  /* "pglast/ast.pyx":1588
 * 
 * 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_t_2 = (__pyx_v_data->dbname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->dbname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1588, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1589
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterDatabaseRefreshCollStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_dbname};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1587
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1592
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterDatabaseSetStmt", 0);

  /* "pglast/ast.pyx":1593
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->dbname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->dbname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1593, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1594
 * 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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->setstmt != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setstmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1595
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterDatabaseSetStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_dbname, __pyx_v_v_setstmt};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1592
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1598
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropdbStmt", 0);

  /* "pglast/ast.pyx":1599
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->dbname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->dbname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1599, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1600
 * 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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1601
 *     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(1, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1601, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1602
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DropdbStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_dbname, __pyx_v_v_missing_ok, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1598
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1605
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterSystemStmt", 0);

  /* "pglast/ast.pyx":1606
 * 
 * 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_t_2 = (__pyx_v_data->setstmt != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->setstmt, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1606, __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":1607
 * 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AlterSystemStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_setstmt};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1605
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1610
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ClusterStmt", 0);

  /* "pglast/ast.pyx":1611
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1611, __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":1612
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->indexname != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->indexname;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1612, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1612, __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_indexname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1613
 *     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(1, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1613, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1614
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ClusterStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_indexname, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1610
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1617
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VacuumStmt", 0);

  /* "pglast/ast.pyx":1618
 * 
 * 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(1, 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(1, 1618, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1619
 * 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(1, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1619, __pyx_L1_error)
  __pyx_v_v_rels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1620
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_vacuumcmd != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_vacuumcmd = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1621
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_VacuumStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_options, __pyx_v_v_rels, __pyx_v_v_is_vacuumcmd};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1617
 * 
 * 
 * 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_2);
  __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":1624
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_VacuumRelation", 0);

  /* "pglast/ast.pyx":1625
 * 
 * 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_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1625, __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":1626
 * 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(1, 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(1, 1626, __pyx_L1_error)
  __pyx_v_v_va_cols = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1627
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_VacuumRelation); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_va_cols};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1624
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1630
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ExplainStmt", 0);

  /* "pglast/ast.pyx":1631
 * 
 * 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_2 = (__pyx_v_data->query != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1631, __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":1632
 * 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(1, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1632, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1633
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ExplainStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_query, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1630
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1636
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTableAsStmt", 0);

  /* "pglast/ast.pyx":1637
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->query != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1637, __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":1638
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->into != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->into, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1638, __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_into = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1639
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ObjectType); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_ObjectType(__pyx_v_data->objtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_objtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1640
 *     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_PyBool_FromLong((!(!(__pyx_v_data->is_select_into != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_is_select_into = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1641
 *     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_PyBool_FromLong((!(!(__pyx_v_data->if_not_exists != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_if_not_exists = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1642
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CreateTableAsStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_5, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1636
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1645
 * 
 * 
 * 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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RefreshMatViewStmt", 0);

  /* "pglast/ast.pyx":1646
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->concurrent != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_concurrent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1647
 * 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_PyBool_FromLong((!(!(__pyx_v_data->skipData != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skipData = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1648
 *     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_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1648, __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":1649
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RefreshMatViewStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1645
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __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":1652
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CheckPointStmt", 0);

  /* "pglast/ast.pyx":1653
 * 
 * cdef create_CheckPointStmt(structs.CheckPointStmt* data, offset_to_index):
 *     return ast.CheckPointStmt()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CheckPointStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1652
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":1656
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DiscardStmt", 0);

  /* "pglast/ast.pyx":1657
 * 
 * cdef create_DiscardStmt(structs.DiscardStmt* data, offset_to_index):
 *     cdef object v_target = getattr(enums, 'DiscardMode')(data.target)             # <<<<<<<<<<<<<<
 *     return ast.DiscardStmt(v_target)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DiscardMode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_DiscardMode(__pyx_v_data->target); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_target = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1658
 * 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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DiscardStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_v_target};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1656
 * 
 * 
 * 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":1661
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_LockStmt", 0);

  /* "pglast/ast.pyx":1662
 * 
 * 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(1, 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(1, 1662, __pyx_L1_error)
  __pyx_v_v_relations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1663
 * 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_PyLong_From_int(__pyx_v_data->mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_mode = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1664
 *     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_PyBool_FromLong((!(!(__pyx_v_data->nowait != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_nowait = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1665
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LockStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_v_relations, __pyx_v_v_mode, __pyx_v_v_nowait};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1661
 * 
 * 
 * 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_2);
  __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":1668
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ConstraintsSetStmt", 0);

  /* "pglast/ast.pyx":1669
 * 
 * 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(1, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1669, __pyx_L1_error)
  __pyx_v_v_constraints = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1670
 * 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_PyBool_FromLong((!(!(__pyx_v_data->deferred != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_deferred = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1671
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConstraintsSetStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_constraints, __pyx_v_v_deferred};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1668
 * 
 * 
 * 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_2);
  __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":1674
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReindexStmt", 0);

  /* "pglast/ast.pyx":1675
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ReindexObjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ReindexObjectType(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1676
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1676, __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":1677
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1677, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1677, __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_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1678
 *     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(1, 1678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1678, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1679
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ReindexStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_kind, __pyx_v_v_relation, __pyx_v_v_name, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1674
 * 
 * 
 * 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":1682
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateConversionStmt", 0);

  /* "pglast/ast.pyx":1683
 * 
 * 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(1, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1683, __pyx_L1_error)
  __pyx_v_v_conversion_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1684
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->for_encoding_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->for_encoding_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1684, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1685
 *     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_)
*/
  __pyx_t_2 = (__pyx_v_data->to_encoding_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->to_encoding_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1685, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1686
 *     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(1, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1686, __pyx_L1_error)
  __pyx_v_v_func_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1687
 *     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_PyBool_FromLong((!(!(__pyx_v_data->def != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_def_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1688
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CreateConversionStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_5, __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((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1682
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1691
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateCastStmt", 0);

  /* "pglast/ast.pyx":1692
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->sourcetype != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->sourcetype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1692, __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_sourcetype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1693
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->targettype != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->targettype, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1693, __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_targettype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1694
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->func != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->func, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1694, __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":1695
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoercionContext); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_CoercionContext(__pyx_v_data->context); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_context = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1696
 *     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_PyBool_FromLong((!(!(__pyx_v_data->inout != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inout = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1697
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CreateCastStmt); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_5, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1691
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1700
 * 
 * 
 * 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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateTransformStmt", 0);

  /* "pglast/ast.pyx":1701
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1702
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->type_name != NULL);
  if (__pyx_t_2) {
    __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(1, 1702, __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":1703
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->lang != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->lang;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1703, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1703, __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":1704
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->fromsql != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->fromsql, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1704, __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":1705
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->tosql != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->tosql, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1705, __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":1706
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreateTransformStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1700
 * 
 * 
 * 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1709
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PrepareStmt", 0);

  /* "pglast/ast.pyx":1710
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1710, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1711
 * 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(1, 1711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1711, __pyx_L1_error)
  __pyx_v_v_argtypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1712
 *     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_2 = (__pyx_v_data->query != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->query, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1713
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PrepareStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_name, __pyx_v_v_argtypes, __pyx_v_v_query};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1709
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1716
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ExecuteStmt", 0);

  /* "pglast/ast.pyx":1717
 * 
 * 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_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1717, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1718
 * 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(1, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1718, __pyx_L1_error)
  __pyx_v_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1719
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ExecuteStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_name, __pyx_v_v_params};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1716
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1722
 * 
 * 
 * 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
 *     cdef object v_isall = bool(data.isall)
*/

static PyObject *__pyx_f_6pglast_6parser_create_DeallocateStmt(DeallocateStmt *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_name = 0;
  PyObject *__pyx_v_v_isall = 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;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DeallocateStmt", 0);

  /* "pglast/ast.pyx":1723
 * 
 * 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             # <<<<<<<<<<<<<<
 *     cdef object v_isall = bool(data.isall)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1723, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1724
 * 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
 *     cdef object v_isall = bool(data.isall)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.DeallocateStmt(v_name, v_isall, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->isall != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isall = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1725
 *     cdef object v_name = data.name.decode("utf-8") if data.name is not NULL else None
 *     cdef object v_isall = bool(data.isall)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.DeallocateStmt(v_name, v_isall, v_location)
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1726
 *     cdef object v_isall = bool(data.isall)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.DeallocateStmt(v_name, v_isall, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_DeallocateStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_v_name, __pyx_v_v_isall, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1722
 * 
 * 
 * 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
 *     cdef object v_isall = bool(data.isall)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pglast.parser.create_DeallocateStmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_name);
  __Pyx_XDECREF(__pyx_v_v_isall);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1729
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropOwnedStmt", 0);

  /* "pglast/ast.pyx":1730
 * 
 * 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(1, 1730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1730, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1731
 * 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_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1732
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DropOwnedStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_v_roles, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1729
 * 
 * 
 * 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":1735
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReassignOwnedStmt", 0);

  /* "pglast/ast.pyx":1736
 * 
 * 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(1, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1736, __pyx_L1_error)
  __pyx_v_v_roles = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1737
 * 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_2 = (__pyx_v_data->newrole != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->newrole, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1737, __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_newrole = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1738
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReassignOwnedStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_roles, __pyx_v_v_newrole};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1735
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1741
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTSDictionaryStmt", 0);

  /* "pglast/ast.pyx":1742
 * 
 * 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(1, 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(1, 1742, __pyx_L1_error)
  __pyx_v_v_dictname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1743
 * 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(1, 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(1, 1743, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1744
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterTSDictionaryStmt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_v_dictname, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1741
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":1747
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterTSConfigurationStmt", 0);

  /* "pglast/ast.pyx":1748
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterTSConfigType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_AlterTSConfigType(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1749
 * 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(1, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1749, __pyx_L1_error)
  __pyx_v_v_cfgname = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1750
 *     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(1, 1750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1750, __pyx_L1_error)
  __pyx_v_v_tokentype = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1751
 *     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(1, 1751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1751, __pyx_L1_error)
  __pyx_v_v_dicts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1752
 *     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_PyBool_FromLong((!(!(__pyx_v_data->override != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1753
 *     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_PyBool_FromLong((!(!(__pyx_v_data->replace != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_replace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1754
 *     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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1755
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterTSConfigurationStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1747
 * 
 * 
 * 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":1758
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PublicationTable", 0);

  /* "pglast/ast.pyx":1759
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->relation != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->relation, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1759, __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":1760
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->whereClause != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->whereClause, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1760, __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":1761
 *     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(1, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1761, __pyx_L1_error)
  __pyx_v_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1762
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PublicationTable); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_relation, __pyx_v_v_whereClause, __pyx_v_v_columns};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1758
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1765
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_PublicationObjSpec", 0);

  /* "pglast/ast.pyx":1766
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PublicationObjSpecType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_PublicationObjSpecType(__pyx_v_data->pubobjtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_pubobjtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1767
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1767, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1767, __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_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1768
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->pubtable != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->pubtable, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1768, __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_pubtable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1769
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1770
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PublicationObjSpec); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_pubobjtype, __pyx_v_v_name, __pyx_v_v_pubtable, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1765
 * 
 * 
 * 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":1773
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreatePublicationStmt", 0);

  /* "pglast/ast.pyx":1774
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->pubname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->pubname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1774, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1775
 * 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(1, 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(1, 1775, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1776
 *     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(1, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1776, __pyx_L1_error)
  __pyx_v_v_pubobjects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1777
 *     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_PyBool_FromLong((!(!(__pyx_v_data->for_all_tables != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_all_tables = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1778
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CreatePublicationStmt); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_pubname, __pyx_v_v_options, __pyx_v_v_pubobjects, __pyx_v_v_for_all_tables};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1773
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1781
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterPublicationStmt", 0);

  /* "pglast/ast.pyx":1782
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->pubname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->pubname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1782, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1783
 * 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(1, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1783, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1784
 *     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(1, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1784, __pyx_L1_error)
  __pyx_v_v_pubobjects = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1785
 *     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_PyBool_FromLong((!(!(__pyx_v_data->for_all_tables != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_for_all_tables = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1786
 *     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_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterPublicationAction); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_AlterPublicationAction(__pyx_v_data->action); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1787
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AlterPublicationStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_7, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1781
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1790
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CreateSubscriptionStmt", 0);

  /* "pglast/ast.pyx":1791
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->subname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->subname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1791, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1792
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->conninfo != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->conninfo;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1792, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1793
 *     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(1, 1793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1793, __pyx_L1_error)
  __pyx_v_v_publication = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1794
 *     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(1, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1794, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1795
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CreateSubscriptionStmt); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_v_subname, __pyx_v_v_conninfo, __pyx_v_v_publication, __pyx_v_v_options};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1790
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1798
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlterSubscriptionStmt", 0);

  /* "pglast/ast.pyx":1799
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterSubscriptionType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_AlterSubscriptionType(__pyx_v_data->kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1800
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->subname != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->subname;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1800, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1800, __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_subname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1801
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->conninfo != NULL);
  if (__pyx_t_6) {
    __pyx_t_9 = __pyx_v_data->conninfo;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1801, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1801, __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_conninfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1802
 *     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(1, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1802, __pyx_L1_error)
  __pyx_v_v_publication = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1803
 *     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(1, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1803, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1804
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlterSubscriptionStmt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1798
 * 
 * 
 * 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":1807
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_DropSubscriptionStmt", 0);

  /* "pglast/ast.pyx":1808
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->subname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->subname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1808, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1809
 * 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_PyBool_FromLong((!(!(__pyx_v_data->missing_ok != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_missing_ok = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1810
 *     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_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DropBehavior); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_DropBehavior(__pyx_v_data->behavior); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_behavior = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1811
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DropSubscriptionStmt); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_v_subname, __pyx_v_v_missing_ok, __pyx_v_v_behavior};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1807
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1814
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Alias", 0);

  /* "pglast/ast.pyx":1815
 * 
 * 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_2 = (__pyx_v_data->aliasname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->aliasname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1815, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1816
 * 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(1, 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(1, 1816, __pyx_L1_error)
  __pyx_v_v_colnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1817
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Alias); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_aliasname, __pyx_v_v_colnames};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1814
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1820
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char const *__pyx_t_6;
  char const *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeVar", 0);

  /* "pglast/ast.pyx":1821
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->catalogname != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->catalogname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1821, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1822
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->schemaname != NULL);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_data->schemaname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1822, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1823
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->relname != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_v_data->relname;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1823, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":1824
 *     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_PyBool_FromLong((!(!(__pyx_v_data->inh != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_inh = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1825
 *     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 = PyUnicode_FromOrdinal(__pyx_v_data->relpersistence); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_relpersistence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1826
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->alias != NULL);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 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":1827
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_8 = __pyx_v_offset_to_index; 
  __pyx_t_9 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_10 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1828
 *     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_t_8 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_RangeVar); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_10 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_10 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_8, __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_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_10, (8-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1820
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":1831
 * 
 * 
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_functype = getattr(enums, 'TableFuncType')(data.functype)
 *     cdef tuple v_ns_uris = _pg_list_to_tuple(data.ns_uris, 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_functype = 0;
  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_colvalexprs = 0;
  PyObject *__pyx_v_v_passingvalexprs = 0;
  PyObject *__pyx_v_v_notnulls = 0;
  PyObject *__pyx_v_v_plan = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TableFunc", 0);

  /* "pglast/ast.pyx":1832
 * 
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):
 *     cdef object v_functype = getattr(enums, 'TableFuncType')(data.functype)             # <<<<<<<<<<<<<<
 *     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)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_TableFuncType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_TableFuncType(__pyx_v_data->functype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_functype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1833
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):
 *     cdef object v_functype = getattr(enums, 'TableFuncType')(data.functype)
 *     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(1, 1833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1833, __pyx_L1_error)
  __pyx_v_v_ns_uris = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1834
 *     cdef object v_functype = getattr(enums, 'TableFuncType')(data.functype)
 *     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(1, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1834, __pyx_L1_error)
  __pyx_v_v_ns_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1835
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->docexpr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->docexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1835, __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_docexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1836
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->rowexpr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rowexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1836, __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_rowexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1837
 *     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(1, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1837, __pyx_L1_error)
  __pyx_v_v_colnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1838
 *     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(1, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1838, __pyx_L1_error)
  __pyx_v_v_coltypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1839
 *     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(1, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1839, __pyx_L1_error)
  __pyx_v_v_coltypmods = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1840
 *     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(1, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1840, __pyx_L1_error)
  __pyx_v_v_colcollations = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1841
 *     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 tuple v_colvalexprs = _pg_list_to_tuple(data.colvalexprs, offset_to_index)
*/
  __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(1, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1841, __pyx_L1_error)
  __pyx_v_v_colexprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1842
 *     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 tuple v_colvalexprs = _pg_list_to_tuple(data.colvalexprs, offset_to_index)
 *     cdef tuple v_passingvalexprs = _pg_list_to_tuple(data.passingvalexprs, offset_to_index)
*/
  __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(1, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1842, __pyx_L1_error)
  __pyx_v_v_coldefexprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1843
 *     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 tuple v_colvalexprs = _pg_list_to_tuple(data.colvalexprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_passingvalexprs = _pg_list_to_tuple(data.passingvalexprs, 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->colvalexprs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1843, __pyx_L1_error)
  __pyx_v_v_colvalexprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1844
 *     cdef tuple v_coldefexprs = _pg_list_to_tuple(data.coldefexprs, offset_to_index)
 *     cdef tuple v_colvalexprs = _pg_list_to_tuple(data.colvalexprs, offset_to_index)
 *     cdef tuple v_passingvalexprs = _pg_list_to_tuple(data.passingvalexprs, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)
 *     cdef object v_plan = create(data.plan, offset_to_index) if data.plan is not NULL else None
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->passingvalexprs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1844, __pyx_L1_error)
  __pyx_v_v_passingvalexprs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1845
 *     cdef tuple v_colvalexprs = _pg_list_to_tuple(data.colvalexprs, offset_to_index)
 *     cdef tuple v_passingvalexprs = _pg_list_to_tuple(data.passingvalexprs, offset_to_index)
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)             # <<<<<<<<<<<<<<
 *     cdef object v_plan = create(data.plan, offset_to_index) if data.plan is not NULL else None
 *     cdef object v_ordinalitycol = data.ordinalitycol
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->notnulls); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1845, __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(1, 1845, __pyx_L1_error)
  __pyx_v_v_notnulls = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1846
 *     cdef tuple v_passingvalexprs = _pg_list_to_tuple(data.passingvalexprs, offset_to_index)
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)
 *     cdef object v_plan = create(data.plan, offset_to_index) if data.plan is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_ordinalitycol = data.ordinalitycol
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_6 = (__pyx_v_data->plan != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->plan, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1846, __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_plan = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1847
 *     cdef set v_notnulls = _pg_bitmapset_to_set(data.notnulls)
 *     cdef object v_plan = create(data.plan, offset_to_index) if data.plan is not NULL else None
 *     cdef object v_ordinalitycol = data.ordinalitycol             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TableFunc(v_functype, v_ns_uris, v_ns_names, v_docexpr, v_rowexpr, v_colnames, v_coltypes, v_coltypmods, v_colcollations, v_colexprs, v_coldefexprs, v_colvalexprs, v_passingvalexprs, v_notnulls, v_plan, v_ordinalitycol, v_location)
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->ordinalitycol); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ordinalitycol = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1848
 *     cdef object v_plan = create(data.plan, offset_to_index) if data.plan is not NULL else None
 *     cdef object v_ordinalitycol = data.ordinalitycol
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.TableFunc(v_functype, v_ns_uris, v_ns_names, v_docexpr, v_rowexpr, v_colnames, v_coltypes, v_coltypmods, v_colcollations, v_colexprs, v_coldefexprs, v_colvalexprs, v_passingvalexprs, v_notnulls, v_plan, v_ordinalitycol, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1849
 *     cdef object v_ordinalitycol = data.ordinalitycol
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.TableFunc(v_functype, v_ns_uris, v_ns_names, v_docexpr, v_rowexpr, v_colnames, v_coltypes, v_coltypmods, v_colcollations, v_colexprs, v_coldefexprs, v_colvalexprs, v_passingvalexprs, v_notnulls, v_plan, v_ordinalitycol, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TableFunc); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[18] = {__pyx_t_3, __pyx_v_v_functype, __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_colvalexprs, __pyx_v_v_passingvalexprs, __pyx_v_v_notnulls, __pyx_v_v_plan, __pyx_v_v_ordinalitycol, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (18-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1831
 * 
 * 
 * cdef create_TableFunc(structs.TableFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_functype = getattr(enums, 'TableFuncType')(data.functype)
 *     cdef tuple v_ns_uris = _pg_list_to_tuple(data.ns_uris, 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_functype);
  __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_colvalexprs);
  __Pyx_XDECREF(__pyx_v_v_passingvalexprs);
  __Pyx_XDECREF(__pyx_v_v_notnulls);
  __Pyx_XDECREF(__pyx_v_v_plan);
  __Pyx_XDECREF(__pyx_v_v_ordinalitycol);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1852
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_IntoClause", 0);

  /* "pglast/ast.pyx":1853
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->rel != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rel, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1853, __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_rel = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1854
 * 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(1, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1854, __pyx_L1_error)
  __pyx_v_v_colNames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1855
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->accessMethod != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->accessMethod;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1855, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1855, __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":1856
 *     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(1, 1856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1856, __pyx_L1_error)
  __pyx_v_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1857
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetAttr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_OnCommitAction); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyLong_From_OnCommitAction(__pyx_v_data->onCommit); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_onCommit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1858
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->tableSpaceName != NULL);
  if (__pyx_t_2) {
    __pyx_t_9 = __pyx_v_data->tableSpaceName;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1858, __pyx_L1_error)
    __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":1859
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->viewQuery != NULL);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_f_6pglast_6parser_create(__pyx_v_data->viewQuery, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 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":1860
 *     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_PyBool_FromLong((!(!(__pyx_v_data->skipData != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_skipData = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1861
 *     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_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IntoClause); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_7, __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((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (9-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1852
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1864
 * 
 * 
 * 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_varnullingrels = 0;
  PyObject *__pyx_v_v_varlevelsup = 0;
  PyObject *__pyx_v_v_varreturningtype = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Var", 0);

  /* "pglast/ast.pyx":1865
 * 
 * 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_PyLong_From_int(__pyx_v_data->varno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1866
 * 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 set v_varnullingrels = _pg_bitmapset_to_set(data.varnullingrels)
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->varattno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varattno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1867
 *     cdef object v_varno = data.varno
 *     cdef object v_varattno = data.varattno
 *     cdef object v_vartypmod = data.vartypmod             # <<<<<<<<<<<<<<
 *     cdef set v_varnullingrels = _pg_bitmapset_to_set(data.varnullingrels)
 *     cdef object v_varlevelsup = data.varlevelsup
*/
  __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_v_data->vartypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_vartypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1868
 *     cdef object v_varattno = data.varattno
 *     cdef object v_vartypmod = data.vartypmod
 *     cdef set v_varnullingrels = _pg_bitmapset_to_set(data.varnullingrels)             # <<<<<<<<<<<<<<
 *     cdef object v_varlevelsup = data.varlevelsup
 *     cdef object v_varreturningtype = getattr(enums, 'VarReturningType')(data.varreturningtype)
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_bitmapset_to_set(__pyx_v_data->varnullingrels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1868, __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(1, 1868, __pyx_L1_error)
  __pyx_v_v_varnullingrels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1869
 *     cdef object v_vartypmod = data.vartypmod
 *     cdef set v_varnullingrels = _pg_bitmapset_to_set(data.varnullingrels)
 *     cdef object v_varlevelsup = data.varlevelsup             # <<<<<<<<<<<<<<
 *     cdef object v_varreturningtype = getattr(enums, 'VarReturningType')(data.varreturningtype)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->varlevelsup); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_varlevelsup = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1870
 *     cdef set v_varnullingrels = _pg_bitmapset_to_set(data.varnullingrels)
 *     cdef object v_varlevelsup = data.varlevelsup
 *     cdef object v_varreturningtype = getattr(enums, 'VarReturningType')(data.varreturningtype)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Var(v_varno, v_varattno, v_vartypmod, v_varnullingrels, v_varlevelsup, v_varreturningtype, v_location)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_VarReturningType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_VarReturningType(__pyx_v_data->varreturningtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_varreturningtype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1871
 *     cdef object v_varlevelsup = data.varlevelsup
 *     cdef object v_varreturningtype = getattr(enums, 'VarReturningType')(data.varreturningtype)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.Var(v_varno, v_varattno, v_vartypmod, v_varnullingrels, v_varlevelsup, v_varreturningtype, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1872
 *     cdef object v_varreturningtype = getattr(enums, 'VarReturningType')(data.varreturningtype)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.Var(v_varno, v_varattno, v_vartypmod, v_varnullingrels, v_varlevelsup, v_varreturningtype, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Var); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_v_varno, __pyx_v_v_varattno, __pyx_v_v_vartypmod, __pyx_v_v_varnullingrels, __pyx_v_v_varlevelsup, __pyx_v_v_varreturningtype, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1864
 * 
 * 
 * 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_varnullingrels);
  __Pyx_XDECREF(__pyx_v_v_varlevelsup);
  __Pyx_XDECREF(__pyx_v_v_varreturningtype);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1875
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Param", 0);

  /* "pglast/ast.pyx":1876
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ParamKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_ParamKind(__pyx_v_data->paramkind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_paramkind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1877
 * 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_PyLong_From_int(__pyx_v_data->paramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_paramid = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1878
 *     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_PyLong_From_int32_t(__pyx_v_data->paramtypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_paramtypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1879
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1880
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Param); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_paramkind, __pyx_v_v_paramid, __pyx_v_v_paramtypmod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1875
 * 
 * 
 * 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":1883
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Aggref", 0);

  /* "pglast/ast.pyx":1884
 * 
 * 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(1, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1884, __pyx_L1_error)
  __pyx_v_v_aggargtypes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1885
 * 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(1, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1885, __pyx_L1_error)
  __pyx_v_v_aggdirectargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1886
 *     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(1, 1886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1886, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1887
 *     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(1, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1887, __pyx_L1_error)
  __pyx_v_v_aggorder = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1888
 *     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(1, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1888, __pyx_L1_error)
  __pyx_v_v_aggdistinct = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1889
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->aggfilter != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->aggfilter, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1889, __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_aggfilter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1890
 *     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_PyBool_FromLong((!(!(__pyx_v_data->aggstar != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_aggstar = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1891
 *     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_PyBool_FromLong((!(!(__pyx_v_data->aggvariadic != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_aggvariadic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1892
 *     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 = PyUnicode_FromOrdinal(__pyx_v_data->aggkind); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_aggkind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1893
 *     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_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->agglevelsup); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agglevelsup = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1894
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AggSplit); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_AggSplit(__pyx_v_data->aggsplit); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_aggsplit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1895
 *     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_1 = __Pyx_PyLong_From_int(__pyx_v_data->aggno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_aggno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1896
 *     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_1 = __Pyx_PyLong_From_int(__pyx_v_data->aggtransno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_aggtransno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1897
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1898
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Aggref); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[15] = {__pyx_t_4, __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_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (15-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1883
 * 
 * 
 * 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_3);
  __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":1901
 * 
 * 
 * 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_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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_GroupingFunc", 0);

  /* "pglast/ast.pyx":1902
 * 
 * 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 object v_agglevelsup = data.agglevelsup
*/
  __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(1, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1902, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1903
 * 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 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->refs, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1903, __pyx_L1_error)
  __pyx_v_v_refs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1904
 *     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 object v_agglevelsup = data.agglevelsup             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.GroupingFunc(v_args, v_refs, v_agglevelsup, v_location)
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->agglevelsup); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_agglevelsup = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1905
 *     cdef tuple v_refs = _pg_list_to_tuple(data.refs, 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_agglevelsup, v_location)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1906
 *     cdef object v_agglevelsup = data.agglevelsup
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.GroupingFunc(v_args, v_refs, v_agglevelsup, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GroupingFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_args, __pyx_v_v_refs, __pyx_v_v_agglevelsup, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1901
 * 
 * 
 * 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_agglevelsup);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1909
 * 
 * 
 * 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_runCondition = 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WindowFunc", 0);

  /* "pglast/ast.pyx":1910
 * 
 * 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 tuple v_runCondition = _pg_list_to_tuple(data.runCondition, 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(1, 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(1, 1910, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1911
 * 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 tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)
 *     cdef object v_winref = data.winref
*/
  __pyx_t_2 = (__pyx_v_data->aggfilter != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->aggfilter, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1911, __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_aggfilter = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1912
 *     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 tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_winref = data.winref
 *     cdef object v_winstar = bool(data.winstar)
*/
  __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(1, 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(1, 1912, __pyx_L1_error)
  __pyx_v_v_runCondition = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1913
 *     cdef object v_aggfilter = create(data.aggfilter, offset_to_index) if data.aggfilter is not NULL else None
 *     cdef tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)
 *     cdef object v_winref = data.winref             # <<<<<<<<<<<<<<
 *     cdef object v_winstar = bool(data.winstar)
 *     cdef object v_winagg = bool(data.winagg)
*/
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_data->winref); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1914
 *     cdef tuple v_runCondition = _pg_list_to_tuple(data.runCondition, offset_to_index)
 *     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_PyBool_FromLong((!(!(__pyx_v_data->winstar != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winstar = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1915
 *     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_runCondition, v_winref, v_winstar, v_winagg, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->winagg != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_winagg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1916
 *     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_runCondition, v_winref, v_winstar, v_winagg, v_location)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1917
 *     cdef object v_winagg = bool(data.winagg)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.WindowFunc(v_args, v_aggfilter, v_runCondition, v_winref, v_winstar, v_winagg, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_WindowFunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __pyx_v_v_args, __pyx_v_v_aggfilter, __pyx_v_v_runCondition, __pyx_v_v_winref, __pyx_v_v_winstar, __pyx_v_v_winagg, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (8-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1909
 * 
 * 
 * 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_3);
  __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_runCondition);
  __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":1920
 * 
 * 
 * cdef create_WindowFuncRunCondition(structs.WindowFuncRunCondition* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_wfunc_left = bool(data.wfunc_left)
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_WindowFuncRunCondition(WindowFuncRunCondition *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_wfunc_left = 0;
  PyObject *__pyx_v_v_arg = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_WindowFuncRunCondition", 0);

  /* "pglast/ast.pyx":1921
 * 
 * cdef create_WindowFuncRunCondition(structs.WindowFuncRunCondition* data, offset_to_index):
 *     cdef object v_wfunc_left = bool(data.wfunc_left)             # <<<<<<<<<<<<<<
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     return ast.WindowFuncRunCondition(v_wfunc_left, v_arg)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->wfunc_left != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_wfunc_left = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1922
 * cdef create_WindowFuncRunCondition(structs.WindowFuncRunCondition* data, offset_to_index):
 *     cdef object v_wfunc_left = bool(data.wfunc_left)
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.WindowFuncRunCondition(v_wfunc_left, v_arg)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1922, __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":1923
 *     cdef object v_wfunc_left = bool(data.wfunc_left)
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg is not NULL else None
 *     return ast.WindowFuncRunCondition(v_wfunc_left, v_arg)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_WindowFuncRunCondition); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_wfunc_left, __pyx_v_v_arg};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1920
 * 
 * 
 * cdef create_WindowFuncRunCondition(structs.WindowFuncRunCondition* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_wfunc_left = bool(data.wfunc_left)
 *     cdef object v_arg = create(data.arg, offset_to_index) if data.arg 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_WindowFuncRunCondition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_wfunc_left);
  __Pyx_XDECREF(__pyx_v_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1926
 * 
 * 
 * cdef create_MergeSupportFunc(structs.MergeSupportFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.MergeSupportFunc(v_location)
*/

static PyObject *__pyx_f_6pglast_6parser_create_MergeSupportFunc(MergeSupportFunc *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MergeSupportFunc", 0);

  /* "pglast/ast.pyx":1927
 * 
 * cdef create_MergeSupportFunc(structs.MergeSupportFunc* data, offset_to_index):
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.MergeSupportFunc(v_location)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1928
 * cdef create_MergeSupportFunc(structs.MergeSupportFunc* data, offset_to_index):
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.MergeSupportFunc(v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MergeSupportFunc); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1926
 * 
 * 
 * cdef create_MergeSupportFunc(structs.MergeSupportFunc* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.MergeSupportFunc(v_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_MergeSupportFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":1931
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SubscriptingRef", 0);

  /* "pglast/ast.pyx":1932
 * 
 * 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_PyLong_From_int32_t(__pyx_v_data->reftypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_reftypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1933
 * 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(1, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1933, __pyx_L1_error)
  __pyx_v_v_refupperindexpr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1934
 *     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(1, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1934, __pyx_L1_error)
  __pyx_v_v_reflowerindexpr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1935
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->refexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->refexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1935, __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_refexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1936
 *     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)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->refassgnexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->refassgnexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1936, __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_refassgnexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1937
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SubscriptingRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1931
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":1940
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FuncExpr", 0);

  /* "pglast/ast.pyx":1941
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->funcretset != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_funcretset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1942
 * 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_PyBool_FromLong((!(!(__pyx_v_data->funcvariadic != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_funcvariadic = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1943
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->funcformat); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_funcformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1944
 *     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(1, 1944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1944, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1945
 *     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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1946
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_FuncExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    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((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1940
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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":1949
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_NamedArgExpr", 0);

  /* "pglast/ast.pyx":1950
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1950, __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":1951
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->name != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->name;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1951, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1951, __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":1952
 *     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_PyLong_From_int(__pyx_v_data->argnumber); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_argnumber = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1953
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_6 = __pyx_v_offset_to_index; 
  __pyx_t_7 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1954
 *     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_t_6 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NamedArgExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_v_arg, __pyx_v_v_name, __pyx_v_v_argnumber, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 1954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1949
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1957
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_OpExpr", 0);

  /* "pglast/ast.pyx":1958
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->opretset != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_opretset = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1959
 * 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(1, 1959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1959, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1960
 *     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_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1961
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OpExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_opretset, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1957
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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":1964
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ScalarArrayOpExpr", 0);

  /* "pglast/ast.pyx":1965
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->useOr != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_useOr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1966
 * 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(1, 1966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1966, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1967
 *     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_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1968
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ScalarArrayOpExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_useOr, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1964
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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":1971
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_BoolExpr", 0);

  /* "pglast/ast.pyx":1972
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BoolExprType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_BoolExprType(__pyx_v_data->boolop); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_boolop = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1973
 * 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(1, 1973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1973, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1974
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1975
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_BoolExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_boolop, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1971
 * 
 * 
 * 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":1978
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SubLink", 0);

  /* "pglast/ast.pyx":1979
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SubLinkType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_SubLinkType(__pyx_v_data->subLinkType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_subLinkType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1980
 * 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_PyLong_From_int(__pyx_v_data->subLinkId); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_subLinkId = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1981
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->testexpr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->testexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1981, __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_testexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1982
 *     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(1, 1982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1982, __pyx_L1_error)
  __pyx_v_v_operName = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1983
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->subselect != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->subselect, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1983, __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_subselect = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1984
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1985
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_SubLink); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __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((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1978
 * 
 * 
 * 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":1988
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SubPlan", 0);

  /* "pglast/ast.pyx":1989
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SubLinkType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_SubLinkType(__pyx_v_data->subLinkType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_subLinkType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1990
 * 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
*/
  __pyx_t_6 = (__pyx_v_data->testexpr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->testexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1990, __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_testexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1991
 *     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(1, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1991, __pyx_L1_error)
  __pyx_v_v_paramIds = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1992
 *     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_PyLong_From_int(__pyx_v_data->plan_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_plan_id = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1993
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->plan_name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->plan_name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1993, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1993, __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_plan_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1994
 *     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_PyLong_From_int32_t(__pyx_v_data->firstColTypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_firstColTypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1995
 *     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_PyBool_FromLong((!(!(__pyx_v_data->useHashTable != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_useHashTable = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1996
 *     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_PyBool_FromLong((!(!(__pyx_v_data->unknownEqFalse != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unknownEqFalse = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1997
 *     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_PyBool_FromLong((!(!(__pyx_v_data->parallel_safe != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_parallel_safe = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1998
 *     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(1, 1998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1998, __pyx_L1_error)
  __pyx_v_v_setParam = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":1999
 *     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(1, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 1999, __pyx_L1_error)
  __pyx_v_v_parParam = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2000
 *     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(1, 2000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2000, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2001
 *     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(1, 2001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_startup_cost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2002
 *     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(1, 2002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_per_call_cost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2003
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SubPlan); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[15] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (15-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":1988
 * 
 * 
 * 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":2006
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_AlternativeSubPlan", 0);

  /* "pglast/ast.pyx":2007
 * 
 * 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(1, 2007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2007, __pyx_L1_error)
  __pyx_v_v_subplans = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2008
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_AlternativeSubPlan); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_subplans};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2006
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":2011
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FieldSelect", 0);

  /* "pglast/ast.pyx":2012
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2012, __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":2013
 * 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_PyLong_From_int(__pyx_v_data->fieldnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_fieldnum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2014
 *     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_PyLong_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2015
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FieldSelect); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_arg, __pyx_v_v_fieldnum, __pyx_v_v_resulttypmod};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2011
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2018
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FieldStore", 0);

  /* "pglast/ast.pyx":2019
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2019, __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":2020
 * 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(1, 2020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2020, __pyx_L1_error)
  __pyx_v_v_newvals = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2021
 *     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(1, 2021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2021, __pyx_L1_error)
  __pyx_v_v_fieldnums = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2022
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FieldStore); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_arg, __pyx_v_v_newvals, __pyx_v_v_fieldnums};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2018
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2025
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RelabelType", 0);

  /* "pglast/ast.pyx":2026
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2026, __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":2027
 * 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_PyLong_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2028
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->relabelformat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_relabelformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2029
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2030
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RelabelType); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_resulttypmod, __pyx_v_v_relabelformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2025
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2033
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoerceViaIO", 0);

  /* "pglast/ast.pyx":2034
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 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_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2035
 * 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->coerceformat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_coerceformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2036
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2037
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CoerceViaIO); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_coerceformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2033
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2040
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ArrayCoerceExpr", 0);

  /* "pglast/ast.pyx":2041
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2041, __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":2042
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->elemexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->elemexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2042, __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_elemexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2043
 *     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_PyLong_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2044
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->coerceformat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_coerceformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2045
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2046
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ArrayCoerceExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __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((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2040
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2049
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ConvertRowtypeExpr", 0);

  /* "pglast/ast.pyx":2050
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2050, __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":2051
 * 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->convertformat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_convertformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2052
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2053
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConvertRowtypeExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_convertformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2049
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2056
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CollateExpr", 0);

  /* "pglast/ast.pyx":2057
 * 
 * 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_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2057, __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":2058
 * 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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2059
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CollateExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2056
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2062
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CaseExpr", 0);

  /* "pglast/ast.pyx":2063
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2063, __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":2064
 * 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(1, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2064, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2065
 *     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)
*/
  __pyx_t_2 = (__pyx_v_data->defresult != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->defresult, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2065, __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_defresult = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2066
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2067
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CaseExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_args, __pyx_v_v_defresult, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2062
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2070
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CaseWhen", 0);

  /* "pglast/ast.pyx":2071
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2071, __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":2072
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->result != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->result, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2072, __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_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2073
 *     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_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_5 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2074
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CaseWhen); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_expr, __pyx_v_v_result, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2070
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2077
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CaseTestExpr", 0);

  /* "pglast/ast.pyx":2078
 * 
 * cdef create_CaseTestExpr(structs.CaseTestExpr* data, offset_to_index):
 *     cdef object v_typeMod = data.typeMod             # <<<<<<<<<<<<<<
 *     return ast.CaseTestExpr(v_typeMod)
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_v_data->typeMod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typeMod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2079
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CaseTestExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_typeMod};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2077
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":2082
 * 
 * 
 * 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_list_start = 0;
  PyObject *__pyx_v_v_list_end = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ArrayExpr", 0);

  /* "pglast/ast.pyx":2083
 * 
 * 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_list_start = offset_to_index(data.list_start)
*/
  __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(1, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2083, __pyx_L1_error)
  __pyx_v_v_elements = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2084
 * 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_list_start = offset_to_index(data.list_start)
 *     cdef object v_list_end = offset_to_index(data.list_end)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->multidims != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_multidims = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2085
 *     cdef tuple v_elements = _pg_list_to_tuple(data.elements, offset_to_index)
 *     cdef object v_multidims = bool(data.multidims)
 *     cdef object v_list_start = offset_to_index(data.list_start)             # <<<<<<<<<<<<<<
 *     cdef object v_list_end = offset_to_index(data.list_end)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->list_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_list_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2086
 *     cdef object v_multidims = bool(data.multidims)
 *     cdef object v_list_start = offset_to_index(data.list_start)
 *     cdef object v_list_end = offset_to_index(data.list_end)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ArrayExpr(v_elements, v_multidims, v_list_start, v_list_end, v_location)
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->list_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_list_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2087
 *     cdef object v_list_start = offset_to_index(data.list_start)
 *     cdef object v_list_end = offset_to_index(data.list_end)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.ArrayExpr(v_elements, v_multidims, v_list_start, v_list_end, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_2 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2088
 *     cdef object v_list_end = offset_to_index(data.list_end)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.ArrayExpr(v_elements, v_multidims, v_list_start, v_list_end, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ArrayExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_v_elements, __pyx_v_v_multidims, __pyx_v_v_list_start, __pyx_v_v_list_end, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2082
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __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_list_start);
  __Pyx_XDECREF(__pyx_v_v_list_end);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2091
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RowExpr", 0);

  /* "pglast/ast.pyx":2092
 * 
 * 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(1, 2092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2092, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2093
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->row_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_row_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2094
 *     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(1, 2094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2094, __pyx_L1_error)
  __pyx_v_v_colnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2095
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2096
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RowExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_args, __pyx_v_v_row_format, __pyx_v_v_colnames, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2091
 * 
 * 
 * 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":2099
 * 
 * 
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_cmptype = getattr(enums, 'CompareType')(data.cmptype)
 *     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_cmptype = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RowCompareExpr", 0);

  /* "pglast/ast.pyx":2100
 * 
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):
 *     cdef object v_cmptype = getattr(enums, 'CompareType')(data.cmptype)             # <<<<<<<<<<<<<<
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CompareType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_CompareType(__pyx_v_data->cmptype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_cmptype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2101
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):
 *     cdef object v_cmptype = getattr(enums, 'CompareType')(data.cmptype)
 *     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(1, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2101, __pyx_L1_error)
  __pyx_v_v_opnos = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2102
 *     cdef object v_cmptype = getattr(enums, 'CompareType')(data.cmptype)
 *     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(1, 2102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2102, __pyx_L1_error)
  __pyx_v_v_opfamilies = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2103
 *     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(1, 2103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2103, __pyx_L1_error)
  __pyx_v_v_inputcollids = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2104
 *     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_cmptype, 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(1, 2104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2104, __pyx_L1_error)
  __pyx_v_v_largs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2105
 *     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_cmptype, 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(1, 2105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2105, __pyx_L1_error)
  __pyx_v_v_rargs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2106
 *     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_cmptype, v_opnos, v_opfamilies, v_inputcollids, v_largs, v_rargs)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RowCompareExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_cmptype, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2099
 * 
 * 
 * cdef create_RowCompareExpr(structs.RowCompareExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_cmptype = getattr(enums, 'CompareType')(data.cmptype)
 *     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_cmptype);
  __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":2109
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoalesceExpr", 0);

  /* "pglast/ast.pyx":2110
 * 
 * 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(1, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2110, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2111
 * 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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2112
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoalesceExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2109
 * 
 * 
 * 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":2115
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_MinMaxExpr", 0);

  /* "pglast/ast.pyx":2116
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MinMaxOp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_MinMaxOp(__pyx_v_data->op); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2117
 * 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(1, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2117, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2118
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2119
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinMaxExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_op, __pyx_v_v_args, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2115
 * 
 * 
 * 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":2122
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SQLValueFunction", 0);

  /* "pglast/ast.pyx":2123
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SQLValueFunctionOp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_SQLValueFunctionOp(__pyx_v_data->op); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2124
 * 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_PyLong_From_int32_t(__pyx_v_data->typmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2125
 *     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_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2126
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_SQLValueFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_op, __pyx_v_v_typmod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2122
 * 
 * 
 * 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":2129
 * 
 * 
 * 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_indent = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_XmlExpr", 0);

  /* "pglast/ast.pyx":2130
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_XmlExprOp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_XmlExprOp(__pyx_v_data->op); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2131
 * 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)
*/
  __pyx_t_6 = (__pyx_v_data->name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2131, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2131, __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_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2132
 *     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(1, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2132, __pyx_L1_error)
  __pyx_v_v_named_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2133
 *     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(1, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2133, __pyx_L1_error)
  __pyx_v_v_arg_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2134
 *     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_indent = bool(data.indent)
*/
  __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(1, 2134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2134, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2135
 *     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_indent = bool(data.indent)
 *     cdef object v_typmod = data.typmod
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_XmlOptionType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_XmlOptionType(__pyx_v_data->xmloption); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_xmloption = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2136
 *     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_indent = bool(data.indent)             # <<<<<<<<<<<<<<
 *     cdef object v_typmod = data.typmod
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->indent != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_indent = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2137
 *     cdef object v_xmloption = getattr(enums, 'XmlOptionType')(data.xmloption)
 *     cdef object v_indent = bool(data.indent)
 *     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_indent, v_typmod, v_location)
*/
  __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_v_data->typmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2138
 *     cdef object v_indent = bool(data.indent)
 *     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_indent, v_typmod, v_location)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2139
 *     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_indent, v_typmod, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_XmlExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[10] = {__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_indent, __pyx_v_v_typmod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (10-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2129
 * 
 * 
 * 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_indent);
  __Pyx_XDECREF(__pyx_v_v_typmod);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2142
 * 
 * 
 * cdef create_JsonFormat(structs.JsonFormat* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_format_type = getattr(enums, 'JsonFormatType')(data.format_type)
 *     cdef object v_encoding = getattr(enums, 'JsonEncoding')(data.encoding)
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonFormat(JsonFormat *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_format_type = 0;
  PyObject *__pyx_v_v_encoding = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonFormat", 0);

  /* "pglast/ast.pyx":2143
 * 
 * cdef create_JsonFormat(structs.JsonFormat* data, offset_to_index):
 *     cdef object v_format_type = getattr(enums, 'JsonFormatType')(data.format_type)             # <<<<<<<<<<<<<<
 *     cdef object v_encoding = getattr(enums, 'JsonEncoding')(data.encoding)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonFormatType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonFormatType(__pyx_v_data->format_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_format_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2144
 * cdef create_JsonFormat(structs.JsonFormat* data, offset_to_index):
 *     cdef object v_format_type = getattr(enums, 'JsonFormatType')(data.format_type)
 *     cdef object v_encoding = getattr(enums, 'JsonEncoding')(data.encoding)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonFormat(v_format_type, v_encoding, v_location)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonEncoding(__pyx_v_data->encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_encoding = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2145
 *     cdef object v_format_type = getattr(enums, 'JsonFormatType')(data.format_type)
 *     cdef object v_encoding = getattr(enums, 'JsonEncoding')(data.encoding)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonFormat(v_format_type, v_encoding, v_location)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2146
 *     cdef object v_encoding = getattr(enums, 'JsonEncoding')(data.encoding)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonFormat(v_format_type, v_encoding, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonFormat); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_format_type, __pyx_v_v_encoding, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2142
 * 
 * 
 * cdef create_JsonFormat(structs.JsonFormat* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_format_type = getattr(enums, 'JsonFormatType')(data.format_type)
 *     cdef object v_encoding = getattr(enums, 'JsonEncoding')(data.encoding)
*/

  /* 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_JsonFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_format_type);
  __Pyx_XDECREF(__pyx_v_v_encoding);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2149
 * 
 * 
 * cdef create_JsonReturning(structs.JsonReturning* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_typmod = data.typmod
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonReturning(JsonReturning *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_format = 0;
  PyObject *__pyx_v_v_typmod = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonReturning", 0);

  /* "pglast/ast.pyx":2150
 * 
 * cdef create_JsonReturning(structs.JsonReturning* data, offset_to_index):
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_typmod = data.typmod
 *     return ast.JsonReturning(v_format, v_typmod)
*/
  __pyx_t_2 = (__pyx_v_data->format != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->format, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2150, __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_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2151
 * cdef create_JsonReturning(structs.JsonReturning* data, offset_to_index):
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_typmod = data.typmod             # <<<<<<<<<<<<<<
 *     return ast.JsonReturning(v_format, v_typmod)
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_From_int32_t(__pyx_v_data->typmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2152
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_typmod = data.typmod
 *     return ast.JsonReturning(v_format, v_typmod)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonReturning); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_format, __pyx_v_v_typmod};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2149
 * 
 * 
 * cdef create_JsonReturning(structs.JsonReturning* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_typmod = data.typmod
*/

  /* 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_JsonReturning", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_format);
  __Pyx_XDECREF(__pyx_v_v_typmod);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2155
 * 
 * 
 * cdef create_JsonValueExpr(structs.JsonValueExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonValueExpr(JsonValueExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_raw_expr = 0;
  PyObject *__pyx_v_v_formatted_expr = 0;
  PyObject *__pyx_v_v_format = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonValueExpr", 0);

  /* "pglast/ast.pyx":2156
 * 
 * cdef create_JsonValueExpr(structs.JsonValueExpr* data, offset_to_index):
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
*/
  __pyx_t_2 = (__pyx_v_data->raw_expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->raw_expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2156, __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_raw_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2157
 * cdef create_JsonValueExpr(structs.JsonValueExpr* data, offset_to_index):
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     return ast.JsonValueExpr(v_raw_expr, v_formatted_expr, v_format)
*/
  __pyx_t_2 = (__pyx_v_data->formatted_expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->formatted_expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2157, __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_formatted_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2158
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.JsonValueExpr(v_raw_expr, v_formatted_expr, v_format)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->format != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->format, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2158, __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_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2159
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     return ast.JsonValueExpr(v_raw_expr, v_formatted_expr, v_format)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonValueExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_raw_expr, __pyx_v_v_formatted_expr, __pyx_v_v_format};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2155
 * 
 * 
 * cdef create_JsonValueExpr(structs.JsonValueExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_raw_expr = create(data.raw_expr, offset_to_index) if data.raw_expr is not NULL else None
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_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_JsonValueExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_raw_expr);
  __Pyx_XDECREF(__pyx_v_v_formatted_expr);
  __Pyx_XDECREF(__pyx_v_v_format);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2162
 * 
 * 
 * cdef create_JsonConstructorExpr(structs.JsonConstructorExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_type = getattr(enums, 'JsonConstructorType')(data.type)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonConstructorExpr(JsonConstructorExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_type = 0;
  PyObject *__pyx_v_v_args = 0;
  PyObject *__pyx_v_v_func = 0;
  PyObject *__pyx_v_v_coercion = 0;
  PyObject *__pyx_v_v_returning = 0;
  PyObject *__pyx_v_v_absent_on_null = 0;
  PyObject *__pyx_v_v_unique = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonConstructorExpr", 0);

  /* "pglast/ast.pyx":2163
 * 
 * cdef create_JsonConstructorExpr(structs.JsonConstructorExpr* data, offset_to_index):
 *     cdef object v_type = getattr(enums, 'JsonConstructorType')(data.type)             # <<<<<<<<<<<<<<
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonConstructorType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonConstructorType(__pyx_v_data->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2164
 * cdef create_JsonConstructorExpr(structs.JsonConstructorExpr* data, offset_to_index):
 *     cdef object v_type = getattr(enums, 'JsonConstructorType')(data.type)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef object v_coercion = create(data.coercion, offset_to_index) if data.coercion 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(1, 2164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2164, __pyx_L1_error)
  __pyx_v_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2165
 *     cdef object v_type = getattr(enums, 'JsonConstructorType')(data.type)
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_coercion = create(data.coercion, offset_to_index) if data.coercion is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->func != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->func, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2165, __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_func = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2166
 *     cdef tuple v_args = _pg_list_to_tuple(data.args, offset_to_index)
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef object v_coercion = create(data.coercion, offset_to_index) if data.coercion is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
*/
  __pyx_t_6 = (__pyx_v_data->coercion != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->coercion, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2166, __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_coercion = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2167
 *     cdef object v_func = create(data.func, offset_to_index) if data.func is not NULL else None
 *     cdef object v_coercion = create(data.coercion, offset_to_index) if data.coercion is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)
*/
  __pyx_t_6 = (__pyx_v_data->returning != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returning, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2167, __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_returning = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2168
 *     cdef object v_coercion = create(data.coercion, offset_to_index) if data.coercion is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)             # <<<<<<<<<<<<<<
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->absent_on_null != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_absent_on_null = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2169
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonConstructorExpr(v_type, v_args, v_func, v_coercion, v_returning, v_absent_on_null, v_unique, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->unique != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unique = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2170
 *     cdef object v_absent_on_null = bool(data.absent_on_null)
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonConstructorExpr(v_type, v_args, v_func, v_coercion, v_returning, v_absent_on_null, v_unique, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2171
 *     cdef object v_unique = bool(data.unique)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonConstructorExpr(v_type, v_args, v_func, v_coercion, v_returning, v_absent_on_null, v_unique, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_JsonConstructorExpr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_v_v_type, __pyx_v_v_args, __pyx_v_v_func, __pyx_v_v_coercion, __pyx_v_v_returning, __pyx_v_v_absent_on_null, __pyx_v_v_unique, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2162
 * 
 * 
 * cdef create_JsonConstructorExpr(structs.JsonConstructorExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_type = getattr(enums, 'JsonConstructorType')(data.type)
 *     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_JsonConstructorExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_type);
  __Pyx_XDECREF(__pyx_v_v_args);
  __Pyx_XDECREF(__pyx_v_v_func);
  __Pyx_XDECREF(__pyx_v_v_coercion);
  __Pyx_XDECREF(__pyx_v_v_returning);
  __Pyx_XDECREF(__pyx_v_v_absent_on_null);
  __Pyx_XDECREF(__pyx_v_v_unique);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2174
 * 
 * 
 * cdef create_JsonIsPredicate(structs.JsonIsPredicate* 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_format = create(data.format, offset_to_index) if data.format is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonIsPredicate(JsonIsPredicate *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_format = 0;
  PyObject *__pyx_v_v_item_type = 0;
  PyObject *__pyx_v_v_unique_keys = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonIsPredicate", 0);

  /* "pglast/ast.pyx":2175
 * 
 * cdef create_JsonIsPredicate(structs.JsonIsPredicate* 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_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_item_type = getattr(enums, 'JsonValueType')(data.item_type)
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2175, __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":2176
 * cdef create_JsonIsPredicate(structs.JsonIsPredicate* 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_format = create(data.format, offset_to_index) if data.format is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_item_type = getattr(enums, 'JsonValueType')(data.item_type)
 *     cdef object v_unique_keys = bool(data.unique_keys)
*/
  __pyx_t_2 = (__pyx_v_data->format != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->format, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2176, __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_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2177
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_item_type = getattr(enums, 'JsonValueType')(data.item_type)             # <<<<<<<<<<<<<<
 *     cdef object v_unique_keys = bool(data.unique_keys)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonValueType); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_JsonValueType(__pyx_v_data->item_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_item_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2178
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_item_type = getattr(enums, 'JsonValueType')(data.item_type)
 *     cdef object v_unique_keys = bool(data.unique_keys)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonIsPredicate(v_expr, v_format, v_item_type, v_unique_keys, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->unique_keys != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_unique_keys = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2179
 *     cdef object v_item_type = getattr(enums, 'JsonValueType')(data.item_type)
 *     cdef object v_unique_keys = bool(data.unique_keys)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonIsPredicate(v_expr, v_format, v_item_type, v_unique_keys, v_location)
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2180
 *     cdef object v_unique_keys = bool(data.unique_keys)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonIsPredicate(v_expr, v_format, v_item_type, v_unique_keys, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonIsPredicate); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_v_expr, __pyx_v_v_format, __pyx_v_v_item_type, __pyx_v_v_unique_keys, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2174
 * 
 * 
 * cdef create_JsonIsPredicate(structs.JsonIsPredicate* 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_format = create(data.format, offset_to_index) if data.format 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_JsonIsPredicate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_format);
  __Pyx_XDECREF(__pyx_v_v_item_type);
  __Pyx_XDECREF(__pyx_v_v_unique_keys);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2183
 * 
 * 
 * cdef create_JsonBehavior(structs.JsonBehavior* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_btype = getattr(enums, 'JsonBehaviorType')(data.btype)
 *     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_JsonBehavior(JsonBehavior *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_btype = 0;
  PyObject *__pyx_v_v_expr = 0;
  PyObject *__pyx_v_v_coerce = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonBehavior", 0);

  /* "pglast/ast.pyx":2184
 * 
 * cdef create_JsonBehavior(structs.JsonBehavior* data, offset_to_index):
 *     cdef object v_btype = getattr(enums, 'JsonBehaviorType')(data.btype)             # <<<<<<<<<<<<<<
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_coerce = bool(data.coerce)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonBehaviorType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonBehaviorType(__pyx_v_data->btype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_btype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2185
 * cdef create_JsonBehavior(structs.JsonBehavior* data, offset_to_index):
 *     cdef object v_btype = getattr(enums, 'JsonBehaviorType')(data.btype)
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_coerce = bool(data.coerce)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_6 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2185, __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_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2186
 *     cdef object v_btype = getattr(enums, 'JsonBehaviorType')(data.btype)
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_coerce = bool(data.coerce)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonBehavior(v_btype, v_expr, v_coerce, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->coerce != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_coerce = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2187
 *     cdef object v_expr = create(data.expr, offset_to_index) if data.expr is not NULL else None
 *     cdef object v_coerce = bool(data.coerce)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonBehavior(v_btype, v_expr, v_coerce, v_location)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_2 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2188
 *     cdef object v_coerce = bool(data.coerce)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonBehavior(v_btype, v_expr, v_coerce, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_JsonBehavior); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_v_btype, __pyx_v_v_expr, __pyx_v_v_coerce, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2183
 * 
 * 
 * cdef create_JsonBehavior(structs.JsonBehavior* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_btype = getattr(enums, 'JsonBehaviorType')(data.btype)
 *     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_JsonBehavior", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_btype);
  __Pyx_XDECREF(__pyx_v_v_expr);
  __Pyx_XDECREF(__pyx_v_v_coerce);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2191
 * 
 * 
 * cdef create_JsonExpr(structs.JsonExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
*/

static PyObject *__pyx_f_6pglast_6parser_create_JsonExpr(JsonExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_op = 0;
  PyObject *__pyx_v_v_column_name = 0;
  PyObject *__pyx_v_v_formatted_expr = 0;
  PyObject *__pyx_v_v_format = 0;
  PyObject *__pyx_v_v_path_spec = 0;
  PyObject *__pyx_v_v_returning = 0;
  PyObject *__pyx_v_v_passing_names = 0;
  PyObject *__pyx_v_v_passing_values = 0;
  PyObject *__pyx_v_v_on_empty = 0;
  PyObject *__pyx_v_v_on_error = 0;
  PyObject *__pyx_v_v_use_io_coercion = 0;
  PyObject *__pyx_v_v_use_json_coercion = 0;
  PyObject *__pyx_v_v_wrapper = 0;
  PyObject *__pyx_v_v_omit_quotes = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_JsonExpr", 0);

  /* "pglast/ast.pyx":2192
 * 
 * cdef create_JsonExpr(structs.JsonExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)             # <<<<<<<<<<<<<<
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonExprOp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonExprOp(__pyx_v_data->op); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_op = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2193
 * cdef create_JsonExpr(structs.JsonExpr* data, offset_to_index):
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->column_name != NULL);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_data->column_name;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2193, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2193, __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_column_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2194
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_path_spec = create(data.path_spec, offset_to_index) if data.path_spec is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->formatted_expr != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->formatted_expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2194, __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_formatted_expr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2195
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_name is not NULL else None
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_path_spec = create(data.path_spec, offset_to_index) if data.path_spec is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
*/
  __pyx_t_6 = (__pyx_v_data->format != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->format, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2195, __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_format = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2196
 *     cdef object v_formatted_expr = create(data.formatted_expr, offset_to_index) if data.formatted_expr is not NULL else None
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_path_spec = create(data.path_spec, offset_to_index) if data.path_spec is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     cdef tuple v_passing_names = _pg_list_to_tuple(data.passing_names, offset_to_index)
*/
  __pyx_t_6 = (__pyx_v_data->path_spec != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->path_spec, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2196, __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_path_spec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2197
 *     cdef object v_format = create(data.format, offset_to_index) if data.format is not NULL else None
 *     cdef object v_path_spec = create(data.path_spec, offset_to_index) if data.path_spec is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef tuple v_passing_names = _pg_list_to_tuple(data.passing_names, offset_to_index)
 *     cdef tuple v_passing_values = _pg_list_to_tuple(data.passing_values, offset_to_index)
*/
  __pyx_t_6 = (__pyx_v_data->returning != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->returning, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2197, __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_returning = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2198
 *     cdef object v_path_spec = create(data.path_spec, offset_to_index) if data.path_spec is not NULL else None
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     cdef tuple v_passing_names = _pg_list_to_tuple(data.passing_names, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef tuple v_passing_values = _pg_list_to_tuple(data.passing_values, offset_to_index)
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->passing_names, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2198, __pyx_L1_error)
  __pyx_v_v_passing_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2199
 *     cdef object v_returning = create(data.returning, offset_to_index) if data.returning is not NULL else None
 *     cdef tuple v_passing_names = _pg_list_to_tuple(data.passing_names, offset_to_index)
 *     cdef tuple v_passing_values = _pg_list_to_tuple(data.passing_values, offset_to_index)             # <<<<<<<<<<<<<<
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
*/
  __pyx_t_1 = __pyx_f_6pglast_6parser__pg_list_to_tuple(__pyx_v_data->passing_values, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2199, __pyx_L1_error)
  __pyx_v_v_passing_values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2200
 *     cdef tuple v_passing_names = _pg_list_to_tuple(data.passing_names, offset_to_index)
 *     cdef tuple v_passing_values = _pg_list_to_tuple(data.passing_values, offset_to_index)
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_use_io_coercion = bool(data.use_io_coercion)
*/
  __pyx_t_6 = (__pyx_v_data->on_empty != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->on_empty, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2200, __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_on_empty = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2201
 *     cdef tuple v_passing_values = _pg_list_to_tuple(data.passing_values, offset_to_index)
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None             # <<<<<<<<<<<<<<
 *     cdef object v_use_io_coercion = bool(data.use_io_coercion)
 *     cdef object v_use_json_coercion = bool(data.use_json_coercion)
*/
  __pyx_t_6 = (__pyx_v_data->on_error != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->on_error, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2201, __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_on_error = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2202
 *     cdef object v_on_empty = create(data.on_empty, offset_to_index) if data.on_empty is not NULL else None
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_use_io_coercion = bool(data.use_io_coercion)             # <<<<<<<<<<<<<<
 *     cdef object v_use_json_coercion = bool(data.use_json_coercion)
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->use_io_coercion != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_use_io_coercion = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2203
 *     cdef object v_on_error = create(data.on_error, offset_to_index) if data.on_error is not NULL else None
 *     cdef object v_use_io_coercion = bool(data.use_io_coercion)
 *     cdef object v_use_json_coercion = bool(data.use_json_coercion)             # <<<<<<<<<<<<<<
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_omit_quotes = bool(data.omit_quotes)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->use_json_coercion != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_use_json_coercion = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2204
 *     cdef object v_use_io_coercion = bool(data.use_io_coercion)
 *     cdef object v_use_json_coercion = bool(data.use_json_coercion)
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)             # <<<<<<<<<<<<<<
 *     cdef object v_omit_quotes = bool(data.omit_quotes)
 *     cdef object v_location = offset_to_index(data.location)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JsonWrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JsonWrapper(__pyx_v_data->wrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_wrapper = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2205
 *     cdef object v_use_json_coercion = bool(data.use_json_coercion)
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_omit_quotes = bool(data.omit_quotes)             # <<<<<<<<<<<<<<
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonExpr(v_op, v_column_name, v_formatted_expr, v_format, v_path_spec, v_returning, v_passing_names, v_passing_values, v_on_empty, v_on_error, v_use_io_coercion, v_use_json_coercion, v_wrapper, v_omit_quotes, v_location)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->omit_quotes != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_omit_quotes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2206
 *     cdef object v_wrapper = getattr(enums, 'JsonWrapper')(data.wrapper)
 *     cdef object v_omit_quotes = bool(data.omit_quotes)
 *     cdef object v_location = offset_to_index(data.location)             # <<<<<<<<<<<<<<
 *     return ast.JsonExpr(v_op, v_column_name, v_formatted_expr, v_format, v_path_spec, v_returning, v_passing_names, v_passing_values, v_on_empty, v_on_error, v_use_io_coercion, v_use_json_coercion, v_wrapper, v_omit_quotes, v_location)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2207
 *     cdef object v_omit_quotes = bool(data.omit_quotes)
 *     cdef object v_location = offset_to_index(data.location)
 *     return ast.JsonExpr(v_op, v_column_name, v_formatted_expr, v_format, v_path_spec, v_returning, v_passing_names, v_passing_values, v_on_empty, v_on_error, v_use_io_coercion, v_use_json_coercion, v_wrapper, v_omit_quotes, v_location)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_JsonExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[16] = {__pyx_t_3, __pyx_v_v_op, __pyx_v_v_column_name, __pyx_v_v_formatted_expr, __pyx_v_v_format, __pyx_v_v_path_spec, __pyx_v_v_returning, __pyx_v_v_passing_names, __pyx_v_v_passing_values, __pyx_v_v_on_empty, __pyx_v_v_on_error, __pyx_v_v_use_io_coercion, __pyx_v_v_use_json_coercion, __pyx_v_v_wrapper, __pyx_v_v_omit_quotes, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (16-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2191
 * 
 * 
 * cdef create_JsonExpr(structs.JsonExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_op = getattr(enums, 'JsonExprOp')(data.op)
 *     cdef object v_column_name = data.column_name.decode("utf-8") if data.column_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_JsonExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_op);
  __Pyx_XDECREF(__pyx_v_v_column_name);
  __Pyx_XDECREF(__pyx_v_v_formatted_expr);
  __Pyx_XDECREF(__pyx_v_v_format);
  __Pyx_XDECREF(__pyx_v_v_path_spec);
  __Pyx_XDECREF(__pyx_v_v_returning);
  __Pyx_XDECREF(__pyx_v_v_passing_names);
  __Pyx_XDECREF(__pyx_v_v_passing_values);
  __Pyx_XDECREF(__pyx_v_v_on_empty);
  __Pyx_XDECREF(__pyx_v_v_on_error);
  __Pyx_XDECREF(__pyx_v_v_use_io_coercion);
  __Pyx_XDECREF(__pyx_v_v_use_json_coercion);
  __Pyx_XDECREF(__pyx_v_v_wrapper);
  __Pyx_XDECREF(__pyx_v_v_omit_quotes);
  __Pyx_XDECREF(__pyx_v_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2210
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_NullTest", 0);

  /* "pglast/ast.pyx":2211
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2211, __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":2212
 * 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NullTestType); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_NullTestType(__pyx_v_data->nulltesttype); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_nulltesttype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2213
 *     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_PyBool_FromLong((!(!(__pyx_v_data->argisrow != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_argisrow = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2214
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2215
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NullTest); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_nulltesttype, __pyx_v_v_argisrow, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2210
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2218
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_BooleanTest", 0);

  /* "pglast/ast.pyx":2219
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2219, __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":2220
 * 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BoolTestType); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_BoolTestType(__pyx_v_data->booltesttype); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_booltesttype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2221
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2222
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BooleanTest); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_booltesttype, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2218
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2225
 * 
 * 
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     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_matchKind = 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  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":2226
 * 
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)             # <<<<<<<<<<<<<<
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
 *     cdef object v_override = getattr(enums, 'OverridingKind')(data.override)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MergeMatchKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_MergeMatchKind(__pyx_v_data->matchKind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_matchKind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2227
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CmdType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_CmdType(__pyx_v_data->commandType); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_commandType = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2228
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OverridingKind); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_OverridingKind(__pyx_v_data->override); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_override = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2229
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->qual != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->qual, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2229, __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_qual = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2230
 *     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_matchKind, 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(1, 2230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2230, __pyx_L1_error)
  __pyx_v_v_targetList = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2231
 *     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_matchKind, 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(1, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2231, __pyx_L1_error)
  __pyx_v_v_updateColnos = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2232
 *     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_matchKind, v_commandType, v_override, v_qual, v_targetList, v_updateColnos)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MergeAction); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_v_matchKind, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2225
 * 
 * 
 * cdef create_MergeAction(structs.MergeAction* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_matchKind = getattr(enums, 'MergeMatchKind')(data.matchKind)
 *     cdef object v_commandType = getattr(enums, 'CmdType')(data.commandType)
*/

  /* 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_MergeAction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_matchKind);
  __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":2235
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoerceToDomain", 0);

  /* "pglast/ast.pyx":2236
 * 
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->arg != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2236, __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":2237
 * 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_PyLong_From_int32_t(__pyx_v_data->resulttypmod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resulttypmod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2238
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoercionForm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_CoercionForm(__pyx_v_data->coercionformat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_coercionformat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2239
 *     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_5 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_4 = __pyx_v_offset_to_index; 
  __pyx_t_3 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2240
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CoerceToDomain); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_v_arg, __pyx_v_v_resulttypmod, __pyx_v_v_coercionformat, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2235
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2243
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CoerceToDomainValue", 0);

  /* "pglast/ast.pyx":2244
 * 
 * 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_PyLong_From_int32_t(__pyx_v_data->typeMod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typeMod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2245
 * 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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2246
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CoerceToDomainValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_typeMod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2243
 * 
 * 
 * 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":2249
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_SetToDefault", 0);

  /* "pglast/ast.pyx":2250
 * 
 * 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_PyLong_From_int32_t(__pyx_v_data->typeMod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_typeMod = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2251
 * 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 = NULL;
  __Pyx_INCREF(__pyx_v_offset_to_index);
  __pyx_t_3 = __pyx_v_offset_to_index; 
  __pyx_t_4 = __Pyx_PyLong_From_ParseLoc(__pyx_v_data->location); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2252
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SetToDefault); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_typeMod, __pyx_v_v_location};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2249
 * 
 * 
 * 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":2255
 * 
 * 
 * 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;
  int __pyx_t_2;
  char const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_CurrentOfExpr", 0);

  /* "pglast/ast.pyx":2256
 * 
 * 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_PyLong_From_unsigned_int(__pyx_v_data->cvarno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cvarno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2257
 * 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)
*/
  __pyx_t_2 = (__pyx_v_data->cursor_name != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->cursor_name;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2257, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":2258
 *     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_PyLong_From_int(__pyx_v_data->cursor_param); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_cursor_param = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2259
 *     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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CurrentOfExpr); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_v_cvarno, __pyx_v_v_cursor_name, __pyx_v_v_cursor_param};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2255
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2262
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_InferenceElem", 0);

  /* "pglast/ast.pyx":2263
 * 
 * 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_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2263, __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":2264
 * 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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_InferenceElem); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2262
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2267
 * 
 * 
 * cdef create_ReturningExpr(structs.ReturningExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_retlevelsup = data.retlevelsup
 *     cdef object v_retold = bool(data.retold)
*/

static PyObject *__pyx_f_6pglast_6parser_create_ReturningExpr(ReturningExpr *__pyx_v_data, PyObject *__pyx_v_offset_to_index) {
  PyObject *__pyx_v_v_retlevelsup = 0;
  PyObject *__pyx_v_v_retold = 0;
  PyObject *__pyx_v_v_retexpr = 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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_ReturningExpr", 0);

  /* "pglast/ast.pyx":2268
 * 
 * cdef create_ReturningExpr(structs.ReturningExpr* data, offset_to_index):
 *     cdef object v_retlevelsup = data.retlevelsup             # <<<<<<<<<<<<<<
 *     cdef object v_retold = bool(data.retold)
 *     cdef object v_retexpr = create(data.retexpr, offset_to_index) if data.retexpr is not NULL else None
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->retlevelsup); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_retlevelsup = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2269
 * cdef create_ReturningExpr(structs.ReturningExpr* data, offset_to_index):
 *     cdef object v_retlevelsup = data.retlevelsup
 *     cdef object v_retold = bool(data.retold)             # <<<<<<<<<<<<<<
 *     cdef object v_retexpr = create(data.retexpr, offset_to_index) if data.retexpr is not NULL else None
 *     return ast.ReturningExpr(v_retlevelsup, v_retold, v_retexpr)
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_data->retold != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_retold = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2270
 *     cdef object v_retlevelsup = data.retlevelsup
 *     cdef object v_retold = bool(data.retold)
 *     cdef object v_retexpr = create(data.retexpr, offset_to_index) if data.retexpr is not NULL else None             # <<<<<<<<<<<<<<
 *     return ast.ReturningExpr(v_retlevelsup, v_retold, v_retexpr)
 * 
*/
  __pyx_t_2 = (__pyx_v_data->retexpr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->retexpr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2270, __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_retexpr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2271
 *     cdef object v_retold = bool(data.retold)
 *     cdef object v_retexpr = create(data.retexpr, offset_to_index) if data.retexpr is not NULL else None
 *     return ast.ReturningExpr(v_retlevelsup, v_retold, v_retexpr)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReturningExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_v_retlevelsup, __pyx_v_v_retold, __pyx_v_v_retexpr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2267
 * 
 * 
 * cdef create_ReturningExpr(structs.ReturningExpr* data, offset_to_index):             # <<<<<<<<<<<<<<
 *     cdef object v_retlevelsup = data.retlevelsup
 *     cdef object v_retold = bool(data.retold)
*/

  /* 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_ReturningExpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v_retlevelsup);
  __Pyx_XDECREF(__pyx_v_v_retold);
  __Pyx_XDECREF(__pyx_v_v_retexpr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/ast.pyx":2274
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_TargetEntry", 0);

  /* "pglast/ast.pyx":2275
 * 
 * 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
*/
  __pyx_t_2 = (__pyx_v_data->expr != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->expr, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2275, __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":2276
 * 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_PyLong_From_int(__pyx_v_data->resno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resno = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2277
 *     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
*/
  __pyx_t_2 = (__pyx_v_data->resname != NULL);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_data->resname;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2277, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2277, __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_resname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2278
 *     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_PyLong_From_unsigned_int(__pyx_v_data->ressortgroupref); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ressortgroupref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2279
 *     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_PyLong_From_int(__pyx_v_data->resorigcol); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resorigcol = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2280
 *     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_PyBool_FromLong((!(!(__pyx_v_data->resjunk != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_resjunk = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2281
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TargetEntry); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_3, __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((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (7-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2274
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2284
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_RangeTblRef", 0);

  /* "pglast/ast.pyx":2285
 * 
 * cdef create_RangeTblRef(structs.RangeTblRef* data, offset_to_index):
 *     cdef object v_rtindex = data.rtindex             # <<<<<<<<<<<<<<
 *     return ast.RangeTblRef(v_rtindex)
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->rtindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_rtindex = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2286
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RangeTblRef); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_rtindex};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2284
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":2289
 * 
 * 
 * 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;
  size_t __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":2290
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JoinType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_JoinType(__pyx_v_data->jointype); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_jointype = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2291
 * 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_PyBool_FromLong((!(!(__pyx_v_data->isNatural != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isNatural = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2292
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->larg != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->larg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2292, __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_larg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2293
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->rarg != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->rarg, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2293, __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_rarg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2294
 *     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(1, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2294, __pyx_L1_error)
  __pyx_v_v_usingClause = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2295
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->join_using_alias != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->join_using_alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2295, __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_join_using_alias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2296
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->quals != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->quals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2296, __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_quals = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2297
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->alias != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->alias, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2297, __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_alias = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2298
 *     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_PyLong_From_int(__pyx_v_data->rtindex); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_rtindex = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2299
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_JoinExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[10] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (10-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2289
 * 
 * 
 * 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":2302
 * 
 * 
 * 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;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_FromExpr", 0);

  /* "pglast/ast.pyx":2303
 * 
 * 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(1, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2303, __pyx_L1_error)
  __pyx_v_v_fromlist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2304
 * 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_2 = (__pyx_v_data->quals != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_6pglast_6parser_create(__pyx_v_data->quals, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2304, __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":2305
 *     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_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FromExpr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_v_fromlist, __pyx_v_v_quals};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2302
 * 
 * 
 * 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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":2308
 * 
 * 
 * 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_OnConflictExpr", 0);

  /* "pglast/ast.pyx":2309
 * 
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enums); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OnConflictAction); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_OnConflictAction(__pyx_v_data->action); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_v_action = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2310
 * 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(1, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2310, __pyx_L1_error)
  __pyx_v_v_arbiterElems = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2311
 *     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
*/
  __pyx_t_6 = (__pyx_v_data->arbiterWhere != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->arbiterWhere, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2311, __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_arbiterWhere = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2312
 *     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(1, 2312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2312, __pyx_L1_error)
  __pyx_v_v_onConflictSet = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2313
 *     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)
*/
  __pyx_t_6 = (__pyx_v_data->onConflictWhere != NULL);
  if (__pyx_t_6) {
    __pyx_t_4 = __pyx_f_6pglast_6parser_create(__pyx_v_data->onConflictWhere, __pyx_v_offset_to_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2313, __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_onConflictWhere = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2314
 *     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_PyLong_From_int(__pyx_v_data->exclRelIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_exclRelIndex = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2315
 *     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(1, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 2315, __pyx_L1_error)
  __pyx_v_v_exclRelTlist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2316
 *     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_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OnConflictExpr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[8] = {__pyx_t_4, __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((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2308
 * 
 * 
 * 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":2319
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Integer", 0);

  /* "pglast/ast.pyx":2320
 * 
 * cdef create_Integer(structs.Integer* data, offset_to_index):
 *     cdef object v_ival = data.ival             # <<<<<<<<<<<<<<
 *     return ast.Integer(v_ival)
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_data->ival); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_ival = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2321
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_ival};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2319
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __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":2324
 * 
 * 
 * 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;
  int __pyx_t_2;
  char *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Float", 0);

  /* "pglast/ast.pyx":2325
 * 
 * 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_t_2 = (__pyx_v_data->fval != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->fval;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2325, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":2326
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_fval};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2324
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2329
 * 
 * 
 * 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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_Boolean", 0);

  /* "pglast/ast.pyx":2330
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->boolval != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_boolval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2331
 * 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_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Boolean); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v_boolval};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2329
 * 
 * 
 * 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_2);
  __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":2334
 * 
 * 
 * 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;
  int __pyx_t_2;
  char *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_String", 0);

  /* "pglast/ast.pyx":2335
 * 
 * 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_t_2 = (__pyx_v_data->sval != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->sval;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2335, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":2336
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_String); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_sval};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2334
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2339
 * 
 * 
 * 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;
  int __pyx_t_2;
  char *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_BitString", 0);

  /* "pglast/ast.pyx":2340
 * 
 * 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_t_2 = (__pyx_v_data->bsval != NULL);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_data->bsval;
    __pyx_t_4 = __Pyx_ssize_strlen(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2340, __pyx_L1_error)
    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, __pyx_t_4, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":2341
 * 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_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BitString); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_v_bsval};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2339
 * 
 * 
 * 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2344
 * 
 * 
 * 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;
  size_t __pyx_t_6;
  char *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_A_Const", 0);

  /* "pglast/ast.pyx":2345
 * 
 * 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_PyBool_FromLong((!(!(__pyx_v_data->isnull != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v_isnull = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pglast/ast.pyx":2347
 *     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":2348
 *     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":2347
 *     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":2349
 *     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":2350
 *         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_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Boolean); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyLong_From_bool(__pyx_v_data->val.boolval.boolval); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2349
 *     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":2351
 *     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":2352
 *         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 = ast.Float(data.val.fval.fval.decode("utf-8"))
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_data->val.ival.ival); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2351
 *     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":2353
 *     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 = ast.Float(data.val.fval.fval.decode("utf-8"))
 *     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":2354
 *         v_val = ast.Integer(data.val.ival.ival)
 *     elif data.val.fval.type == structs.T_Float:
 *         v_val = ast.Float(data.val.fval.fval.decode("utf-8"))             # <<<<<<<<<<<<<<
 *     elif data.val.bsval.type == structs.T_BitString:
 *         v_val = ast.BitString(data.val.bsval.bsval.decode("utf-8"))
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __pyx_v_data->val.fval.fval;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2354, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2353
 *     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 = ast.Float(data.val.fval.fval.decode("utf-8"))
 *     elif data.val.bsval.type == structs.T_BitString:
*/
    goto __pyx_L3;
  }

  /* "pglast/ast.pyx":2355
 *     elif data.val.fval.type == structs.T_Float:
 *         v_val = ast.Float(data.val.fval.fval.decode("utf-8"))
 *     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":2356
 *         v_val = ast.Float(data.val.fval.fval.decode("utf-8"))
 *     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_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BitString); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __pyx_v_data->val.bsval.bsval;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2356, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2355
 *     elif data.val.fval.type == structs.T_Float:
 *         v_val = ast.Float(data.val.fval.fval.decode("utf-8"))
 *     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":2357
 *     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":2358
 *         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_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_String); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __pyx_v_data->val.sval.sval;
    __pyx_t_8 = __Pyx_ssize_strlen(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 2358, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_7, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pglast/ast.pyx":2357
 *     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":2360
 *         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(1, 2360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_v_val = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "pglast/ast.pyx":2361
 *     else:
 *         v_val = data.val.node
 *     return ast.A_Const(v_isnull, v_val)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_A_Const); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_v_isnull, __pyx_v_v_val};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __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(1, 2361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pglast/ast.pyx":2344
 * 
 * 
 * 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":2364
 * 
 * 
 * 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;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create", 0);

  /* "pglast/ast.pyx":2365
 * 
 * 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":2366
 * 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":2365
 * 
 * cdef create(void* data, offset_to_index):
 *     if data is NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  }

  /* "pglast/ast.pyx":2371
 *     cdef int i
 *     cdef str s
 *     cdef int tag = structs.nodeTag(data)             # <<<<<<<<<<<<<<
 * 
 *     if tag == structs.T_List:
*/
  __pyx_v_tag = nodeTag(__pyx_v_data);

  /* "pglast/ast.pyx":2373
 *     cdef int tag = structs.nodeTag(data)
 * 
 *     if tag == structs.T_List:             # <<<<<<<<<<<<<<
 *          return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 *     elif tag == structs.T_Alias:
*/
  switch (__pyx_v_tag) {
    case T_List:

    /* "pglast/ast.pyx":2374
 * 
 *     if tag == structs.T_List:
 *          return _pg_list_to_tuple(<structs.List *> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_Alias:
 *         return create_Alias(<structs.Alias*> 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(1, 2374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2373
 *     cdef int tag = structs.nodeTag(data)
 * 
 *     if tag == structs.T_List:             # <<<<<<<<<<<<<<
 *          return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 *     elif tag == structs.T_Alias:
*/
    break;
    case T_Alias:

    /* "pglast/ast.pyx":2376
 *          return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 *     elif 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(1, 2376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2375
 *     if tag == structs.T_List:
 *          return _pg_list_to_tuple(<structs.List *> data, offset_to_index)
 *     elif 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":2378
 *         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(1, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2377
 *     elif 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":2380
 *         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_IntoClause:
 *         return create_IntoClause(<structs.IntoClause*> 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(1, 2380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2379
 *     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_IntoClause:
*/
    break;
    case T_IntoClause:

    /* "pglast/ast.pyx":2382
 *         return create_TableFunc(<structs.TableFunc*> data, offset_to_index)
 *     elif tag == structs.T_IntoClause:
 *         return create_IntoClause(<structs.IntoClause*> 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_IntoClause(((IntoClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2381
 *     elif tag == structs.T_TableFunc:
 *         return create_TableFunc(<structs.TableFunc*> data, offset_to_index)
 *     elif tag == structs.T_IntoClause:             # <<<<<<<<<<<<<<
 *         return create_IntoClause(<structs.IntoClause*> data, offset_to_index)
 *     elif tag == structs.T_Var:
*/
    break;
    case T_Var:

    /* "pglast/ast.pyx":2384
 *         return create_IntoClause(<structs.IntoClause*> 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(1, 2384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2383
 *     elif tag == structs.T_IntoClause:
 *         return create_IntoClause(<structs.IntoClause*> 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":2386
 *         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(1, 2386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2385
 *     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":2388
 *         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(1, 2388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2387
 *     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":2390
 *         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(1, 2390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2389
 *     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":2392
 *         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_WindowFuncRunCondition:
 *         return create_WindowFuncRunCondition(<structs.WindowFuncRunCondition*> 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(1, 2392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2391
 *     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_WindowFuncRunCondition:
*/
    break;
    case T_WindowFuncRunCondition:

    /* "pglast/ast.pyx":2394
 *         return create_WindowFunc(<structs.WindowFunc*> data, offset_to_index)
 *     elif tag == structs.T_WindowFuncRunCondition:
 *         return create_WindowFuncRunCondition(<structs.WindowFuncRunCondition*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_MergeSupportFunc:
 *         return create_MergeSupportFunc(<structs.MergeSupportFunc*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_WindowFuncRunCondition(((WindowFuncRunCondition *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2393
 *     elif tag == structs.T_WindowFunc:
 *         return create_WindowFunc(<structs.WindowFunc*> data, offset_to_index)
 *     elif tag == structs.T_WindowFuncRunCondition:             # <<<<<<<<<<<<<<
 *         return create_WindowFuncRunCondition(<structs.WindowFuncRunCondition*> data, offset_to_index)
 *     elif tag == structs.T_MergeSupportFunc:
*/
    break;
    case T_MergeSupportFunc:

    /* "pglast/ast.pyx":2396
 *         return create_WindowFuncRunCondition(<structs.WindowFuncRunCondition*> data, offset_to_index)
 *     elif tag == structs.T_MergeSupportFunc:
 *         return create_MergeSupportFunc(<structs.MergeSupportFunc*> 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_MergeSupportFunc(((MergeSupportFunc *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2395
 *     elif tag == structs.T_WindowFuncRunCondition:
 *         return create_WindowFuncRunCondition(<structs.WindowFuncRunCondition*> data, offset_to_index)
 *     elif tag == structs.T_MergeSupportFunc:             # <<<<<<<<<<<<<<
 *         return create_MergeSupportFunc(<structs.MergeSupportFunc*> data, offset_to_index)
 *     elif tag == structs.T_SubscriptingRef:
*/
    break;
    case T_SubscriptingRef:

    /* "pglast/ast.pyx":2398
 *         return create_MergeSupportFunc(<structs.MergeSupportFunc*> 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(1, 2398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2397
 *     elif tag == structs.T_MergeSupportFunc:
 *         return create_MergeSupportFunc(<structs.MergeSupportFunc*> 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":2400
 *         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(1, 2400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2399
 *     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":2402
 *         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(1, 2402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2401
 *     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":2404
 *         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(1, 2404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2403
 *     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":2406
 *         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(1, 2406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2405
 *     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":2408
 *         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(1, 2408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2407
 *     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":2410
 *         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(1, 2410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2409
 *     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":2412
 *         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(1, 2412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2411
 *     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":2414
 *         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(1, 2414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2413
 *     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":2416
 *         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(1, 2416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2415
 *     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":2418
 *         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(1, 2418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2417
 *     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":2420
 *         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(1, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2419
 *     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":2422
 *         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(1, 2422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2421
 *     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":2424
 *         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(1, 2424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2423
 *     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":2426
 *         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(1, 2426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2425
 *     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":2428
 *         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(1, 2428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2427
 *     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":2430
 *         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(1, 2430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2429
 *     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":2432
 *         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(1, 2432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2431
 *     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":2434
 *         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(1, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2433
 *     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":2436
 *         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(1, 2436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2435
 *     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":2438
 *         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(1, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2437
 *     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":2440
 *         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(1, 2440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2439
 *     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":2442
 *         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(1, 2442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2441
 *     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":2444
 *         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(1, 2444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2443
 *     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":2446
 *         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(1, 2446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2445
 *     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":2448
 *         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_JsonFormat:
 *         return create_JsonFormat(<structs.JsonFormat*> 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(1, 2448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2447
 *     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_JsonFormat:
*/
    break;
    case T_JsonFormat:

    /* "pglast/ast.pyx":2450
 *         return create_XmlExpr(<structs.XmlExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonFormat:
 *         return create_JsonFormat(<structs.JsonFormat*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonReturning:
 *         return create_JsonReturning(<structs.JsonReturning*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonFormat(((JsonFormat *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2449
 *     elif tag == structs.T_XmlExpr:
 *         return create_XmlExpr(<structs.XmlExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonFormat:             # <<<<<<<<<<<<<<
 *         return create_JsonFormat(<structs.JsonFormat*> data, offset_to_index)
 *     elif tag == structs.T_JsonReturning:
*/
    break;
    case T_JsonReturning:

    /* "pglast/ast.pyx":2452
 *         return create_JsonFormat(<structs.JsonFormat*> data, offset_to_index)
 *     elif tag == structs.T_JsonReturning:
 *         return create_JsonReturning(<structs.JsonReturning*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonValueExpr:
 *         return create_JsonValueExpr(<structs.JsonValueExpr*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonReturning(((JsonReturning *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2451
 *     elif tag == structs.T_JsonFormat:
 *         return create_JsonFormat(<structs.JsonFormat*> data, offset_to_index)
 *     elif tag == structs.T_JsonReturning:             # <<<<<<<<<<<<<<
 *         return create_JsonReturning(<structs.JsonReturning*> data, offset_to_index)
 *     elif tag == structs.T_JsonValueExpr:
*/
    break;
    case T_JsonValueExpr:

    /* "pglast/ast.pyx":2454
 *         return create_JsonReturning(<structs.JsonReturning*> data, offset_to_index)
 *     elif tag == structs.T_JsonValueExpr:
 *         return create_JsonValueExpr(<structs.JsonValueExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonConstructorExpr:
 *         return create_JsonConstructorExpr(<structs.JsonConstructorExpr*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonValueExpr(((JsonValueExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2453
 *     elif tag == structs.T_JsonReturning:
 *         return create_JsonReturning(<structs.JsonReturning*> data, offset_to_index)
 *     elif tag == structs.T_JsonValueExpr:             # <<<<<<<<<<<<<<
 *         return create_JsonValueExpr(<structs.JsonValueExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonConstructorExpr:
*/
    break;
    case T_JsonConstructorExpr:

    /* "pglast/ast.pyx":2456
 *         return create_JsonValueExpr(<structs.JsonValueExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonConstructorExpr:
 *         return create_JsonConstructorExpr(<structs.JsonConstructorExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonIsPredicate:
 *         return create_JsonIsPredicate(<structs.JsonIsPredicate*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonConstructorExpr(((JsonConstructorExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2455
 *     elif tag == structs.T_JsonValueExpr:
 *         return create_JsonValueExpr(<structs.JsonValueExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonConstructorExpr:             # <<<<<<<<<<<<<<
 *         return create_JsonConstructorExpr(<structs.JsonConstructorExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonIsPredicate:
*/
    break;
    case T_JsonIsPredicate:

    /* "pglast/ast.pyx":2458
 *         return create_JsonConstructorExpr(<structs.JsonConstructorExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonIsPredicate:
 *         return create_JsonIsPredicate(<structs.JsonIsPredicate*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonBehavior:
 *         return create_JsonBehavior(<structs.JsonBehavior*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonIsPredicate(((JsonIsPredicate *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2457
 *     elif tag == structs.T_JsonConstructorExpr:
 *         return create_JsonConstructorExpr(<structs.JsonConstructorExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonIsPredicate:             # <<<<<<<<<<<<<<
 *         return create_JsonIsPredicate(<structs.JsonIsPredicate*> data, offset_to_index)
 *     elif tag == structs.T_JsonBehavior:
*/
    break;
    case T_JsonBehavior:

    /* "pglast/ast.pyx":2460
 *         return create_JsonIsPredicate(<structs.JsonIsPredicate*> data, offset_to_index)
 *     elif tag == structs.T_JsonBehavior:
 *         return create_JsonBehavior(<structs.JsonBehavior*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonExpr:
 *         return create_JsonExpr(<structs.JsonExpr*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonBehavior(((JsonBehavior *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2459
 *     elif tag == structs.T_JsonIsPredicate:
 *         return create_JsonIsPredicate(<structs.JsonIsPredicate*> data, offset_to_index)
 *     elif tag == structs.T_JsonBehavior:             # <<<<<<<<<<<<<<
 *         return create_JsonBehavior(<structs.JsonBehavior*> data, offset_to_index)
 *     elif tag == structs.T_JsonExpr:
*/
    break;
    case T_JsonExpr:

    /* "pglast/ast.pyx":2462
 *         return create_JsonBehavior(<structs.JsonBehavior*> data, offset_to_index)
 *     elif tag == structs.T_JsonExpr:
 *         return create_JsonExpr(<structs.JsonExpr*> 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_JsonExpr(((JsonExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2461
 *     elif tag == structs.T_JsonBehavior:
 *         return create_JsonBehavior(<structs.JsonBehavior*> data, offset_to_index)
 *     elif tag == structs.T_JsonExpr:             # <<<<<<<<<<<<<<
 *         return create_JsonExpr(<structs.JsonExpr*> data, offset_to_index)
 *     elif tag == structs.T_NullTest:
*/
    break;
    case T_NullTest:

    /* "pglast/ast.pyx":2464
 *         return create_JsonExpr(<structs.JsonExpr*> 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(1, 2464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2463
 *     elif tag == structs.T_JsonExpr:
 *         return create_JsonExpr(<structs.JsonExpr*> 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":2466
 *         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_MergeAction:
 *         return create_MergeAction(<structs.MergeAction*> 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(1, 2466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2465
 *     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_MergeAction:
*/
    break;
    case T_MergeAction:

    /* "pglast/ast.pyx":2468
 *         return create_BooleanTest(<structs.BooleanTest*> data, offset_to_index)
 *     elif tag == structs.T_MergeAction:
 *         return create_MergeAction(<structs.MergeAction*> 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_MergeAction(((MergeAction *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2467
 *     elif tag == structs.T_BooleanTest:
 *         return create_BooleanTest(<structs.BooleanTest*> data, offset_to_index)
 *     elif tag == structs.T_MergeAction:             # <<<<<<<<<<<<<<
 *         return create_MergeAction(<structs.MergeAction*> data, offset_to_index)
 *     elif tag == structs.T_CoerceToDomain:
*/
    break;
    case T_CoerceToDomain:

    /* "pglast/ast.pyx":2470
 *         return create_MergeAction(<structs.MergeAction*> 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(1, 2470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2469
 *     elif tag == structs.T_MergeAction:
 *         return create_MergeAction(<structs.MergeAction*> 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":2472
 *         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(1, 2472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2471
 *     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":2474
 *         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(1, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2473
 *     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":2476
 *         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(1, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2475
 *     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":2478
 *         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_ReturningExpr:
 *         return create_ReturningExpr(<structs.ReturningExpr*> 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(1, 2478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2477
 *     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_ReturningExpr:
*/
    break;
    case T_ReturningExpr:

    /* "pglast/ast.pyx":2480
 *         return create_InferenceElem(<structs.InferenceElem*> data, offset_to_index)
 *     elif tag == structs.T_ReturningExpr:
 *         return create_ReturningExpr(<structs.ReturningExpr*> 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_ReturningExpr(((ReturningExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2479
 *     elif tag == structs.T_InferenceElem:
 *         return create_InferenceElem(<structs.InferenceElem*> data, offset_to_index)
 *     elif tag == structs.T_ReturningExpr:             # <<<<<<<<<<<<<<
 *         return create_ReturningExpr(<structs.ReturningExpr*> data, offset_to_index)
 *     elif tag == structs.T_TargetEntry:
*/
    break;
    case T_TargetEntry:

    /* "pglast/ast.pyx":2482
 *         return create_ReturningExpr(<structs.ReturningExpr*> 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(1, 2482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2481
 *     elif tag == structs.T_ReturningExpr:
 *         return create_ReturningExpr(<structs.ReturningExpr*> 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":2484
 *         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(1, 2484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2483
 *     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":2486
 *         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(1, 2486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2485
 *     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":2488
 *         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(1, 2488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2487
 *     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":2490
 *         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_Query:
 *         return create_Query(<structs.Query*> 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(1, 2490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2489
 *     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_Query:
*/
    break;
    case T_Query:

    /* "pglast/ast.pyx":2492
 *         return create_OnConflictExpr(<structs.OnConflictExpr*> data, offset_to_index)
 *     elif tag == structs.T_Query:
 *         return create_Query(<structs.Query*> 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_Query(((Query *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2491
 *     elif tag == structs.T_OnConflictExpr:
 *         return create_OnConflictExpr(<structs.OnConflictExpr*> data, offset_to_index)
 *     elif tag == structs.T_Query:             # <<<<<<<<<<<<<<
 *         return create_Query(<structs.Query*> data, offset_to_index)
 *     elif tag == structs.T_TypeName:
*/
    break;
    case T_TypeName:

    /* "pglast/ast.pyx":2494
 *         return create_Query(<structs.Query*> data, offset_to_index)
 *     elif tag == structs.T_TypeName:
 *         return create_TypeName(<structs.TypeName*> 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_TypeName(((TypeName *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2493
 *     elif tag == structs.T_Query:
 *         return create_Query(<structs.Query*> data, offset_to_index)
 *     elif tag == structs.T_TypeName:             # <<<<<<<<<<<<<<
 *         return create_TypeName(<structs.TypeName*> data, offset_to_index)
 *     elif tag == structs.T_ColumnRef:
*/
    break;
    case T_ColumnRef:

    /* "pglast/ast.pyx":2496
 *         return create_TypeName(<structs.TypeName*> 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(1, 2496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2495
 *     elif tag == structs.T_TypeName:
 *         return create_TypeName(<structs.TypeName*> 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":2498
 *         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_Expr:
 *         return create_A_Expr(<structs.A_Expr*> 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(1, 2498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2497
 *     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_Expr:
*/
    break;
    case T_A_Expr:

    /* "pglast/ast.pyx":2500
 *         return create_ParamRef(<structs.ParamRef*> 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_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_A_Expr(((A_Expr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2499
 *     elif tag == structs.T_ParamRef:
 *         return create_ParamRef(<structs.ParamRef*> 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_A_Const:
*/
    break;
    case T_A_Const:

    /* "pglast/ast.pyx":2502
 *         return create_A_Expr(<structs.A_Expr*> 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_TypeCast:
 *         return create_TypeCast(<structs.TypeCast*> 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(1, 2502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2501
 *     elif tag == structs.T_A_Expr:
 *         return create_A_Expr(<structs.A_Expr*> 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_TypeCast:
*/
    break;
    case T_TypeCast:

    /* "pglast/ast.pyx":2504
 *         return create_A_Const(<structs.A_Const*> 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(1, 2504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2503
 *     elif tag == structs.T_A_Const:
 *         return create_A_Const(<structs.A_Const*> 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":2506
 *         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_RoleSpec:
 *         return create_RoleSpec(<structs.RoleSpec*> 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(1, 2506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2505
 *     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_RoleSpec:
*/
    break;
    case T_RoleSpec:

    /* "pglast/ast.pyx":2508
 *         return create_CollateClause(<structs.CollateClause*> data, offset_to_index)
 *     elif tag == structs.T_RoleSpec:
 *         return create_RoleSpec(<structs.RoleSpec*> 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_RoleSpec(((RoleSpec *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2507
 *     elif tag == structs.T_CollateClause:
 *         return create_CollateClause(<structs.CollateClause*> data, offset_to_index)
 *     elif tag == structs.T_RoleSpec:             # <<<<<<<<<<<<<<
 *         return create_RoleSpec(<structs.RoleSpec*> data, offset_to_index)
 *     elif tag == structs.T_FuncCall:
*/
    break;
    case T_FuncCall:

    /* "pglast/ast.pyx":2510
 *         return create_RoleSpec(<structs.RoleSpec*> 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(1, 2510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2509
 *     elif tag == structs.T_RoleSpec:
 *         return create_RoleSpec(<structs.RoleSpec*> 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":2512
 *         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(1, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2511
 *     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":2514
 *         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(1, 2514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2513
 *     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":2516
 *         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(1, 2516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2515
 *     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":2518
 *         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(1, 2518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2517
 *     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":2520
 *         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(1, 2520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2519
 *     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":2522
 *         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_SortBy:
 *         return create_SortBy(<structs.SortBy*> 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(1, 2522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2521
 *     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_SortBy:
*/
    break;
    case T_SortBy:

    /* "pglast/ast.pyx":2524
 *         return create_MultiAssignRef(<structs.MultiAssignRef*> 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(1, 2524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2523
 *     elif tag == structs.T_MultiAssignRef:
 *         return create_MultiAssignRef(<structs.MultiAssignRef*> 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":2526
 *         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(1, 2526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2525
 *     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":2528
 *         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(1, 2528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2527
 *     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":2530
 *         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_RangeTableFunc:
 *         return create_RangeTableFunc(<structs.RangeTableFunc*> 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(1, 2530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2529
 *     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_RangeTableFunc:
*/
    break;
    case T_RangeTableFunc:

    /* "pglast/ast.pyx":2532
 *         return create_RangeFunction(<structs.RangeFunction*> 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(1, 2532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2531
 *     elif tag == structs.T_RangeFunction:
 *         return create_RangeFunction(<structs.RangeFunction*> 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":2534
 *         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_RangeTableSample:
 *         return create_RangeTableSample(<structs.RangeTableSample*> 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(1, 2534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2533
 *     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_RangeTableSample:
*/
    break;
    case T_RangeTableSample:

    /* "pglast/ast.pyx":2536
 *         return create_RangeTableFuncCol(<structs.RangeTableFuncCol*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableSample:
 *         return create_RangeTableSample(<structs.RangeTableSample*> 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_RangeTableSample(((RangeTableSample *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2535
 *     elif tag == structs.T_RangeTableFuncCol:
 *         return create_RangeTableFuncCol(<structs.RangeTableFuncCol*> data, offset_to_index)
 *     elif tag == structs.T_RangeTableSample:             # <<<<<<<<<<<<<<
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)
 *     elif tag == structs.T_ColumnDef:
*/
    break;
    case T_ColumnDef:

    /* "pglast/ast.pyx":2538
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)
 *     elif tag == structs.T_ColumnDef:
 *         return create_ColumnDef(<structs.ColumnDef*> 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_ColumnDef(((ColumnDef *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2537
 *     elif tag == structs.T_RangeTableSample:
 *         return create_RangeTableSample(<structs.RangeTableSample*> data, offset_to_index)
 *     elif tag == structs.T_ColumnDef:             # <<<<<<<<<<<<<<
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)
 *     elif tag == structs.T_TableLikeClause:
*/
    break;
    case T_TableLikeClause:

    /* "pglast/ast.pyx":2540
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)
 *     elif tag == structs.T_TableLikeClause:
 *         return create_TableLikeClause(<structs.TableLikeClause*> 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_TableLikeClause(((TableLikeClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2539
 *     elif tag == structs.T_ColumnDef:
 *         return create_ColumnDef(<structs.ColumnDef*> data, offset_to_index)
 *     elif tag == structs.T_TableLikeClause:             # <<<<<<<<<<<<<<
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)
 *     elif tag == structs.T_IndexElem:
*/
    break;
    case T_IndexElem:

    /* "pglast/ast.pyx":2542
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)
 *     elif tag == structs.T_IndexElem:
 *         return create_IndexElem(<structs.IndexElem*> 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_IndexElem(((IndexElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2541
 *     elif tag == structs.T_TableLikeClause:
 *         return create_TableLikeClause(<structs.TableLikeClause*> data, offset_to_index)
 *     elif tag == structs.T_IndexElem:             # <<<<<<<<<<<<<<
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)
 *     elif tag == structs.T_DefElem:
*/
    break;
    case T_DefElem:

    /* "pglast/ast.pyx":2544
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)
 *     elif tag == structs.T_DefElem:
 *         return create_DefElem(<structs.DefElem*> 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_DefElem(((DefElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2543
 *     elif tag == structs.T_IndexElem:
 *         return create_IndexElem(<structs.IndexElem*> data, offset_to_index)
 *     elif tag == structs.T_DefElem:             # <<<<<<<<<<<<<<
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)
 *     elif tag == structs.T_LockingClause:
*/
    break;
    case T_LockingClause:

    /* "pglast/ast.pyx":2546
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)
 *     elif tag == structs.T_LockingClause:
 *         return create_LockingClause(<structs.LockingClause*> 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_LockingClause(((LockingClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2545
 *     elif tag == structs.T_DefElem:
 *         return create_DefElem(<structs.DefElem*> data, offset_to_index)
 *     elif tag == structs.T_LockingClause:             # <<<<<<<<<<<<<<
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)
 *     elif tag == structs.T_XmlSerialize:
*/
    break;
    case T_XmlSerialize:

    /* "pglast/ast.pyx":2548
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)
 *     elif tag == structs.T_XmlSerialize:
 *         return create_XmlSerialize(<structs.XmlSerialize*> 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_XmlSerialize(((XmlSerialize *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2547
 *     elif tag == structs.T_LockingClause:
 *         return create_LockingClause(<structs.LockingClause*> data, offset_to_index)
 *     elif tag == structs.T_XmlSerialize:             # <<<<<<<<<<<<<<
 *         return create_XmlSerialize(<structs.XmlSerialize*> data, offset_to_index)
 *     elif tag == structs.T_PartitionElem:
*/
    break;
    case T_PartitionElem:

    /* "pglast/ast.pyx":2550
 *         return create_XmlSerialize(<structs.XmlSerialize*> 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(1, 2550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2549
 *     elif tag == structs.T_XmlSerialize:
 *         return create_XmlSerialize(<structs.XmlSerialize*> 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":2552
 *         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(1, 2552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2551
 *     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":2554
 *         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(1, 2554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2553
 *     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":2556
 *         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(1, 2556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2555
 *     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":2558
 *         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_RangeTblEntry:
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> 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(1, 2558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2557
 *     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_RangeTblEntry:
*/
    break;
    case T_RangeTblEntry:

    /* "pglast/ast.pyx":2560
 *         return create_PartitionCmd(<structs.PartitionCmd*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblEntry:
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_RTEPermissionInfo:
 *         return create_RTEPermissionInfo(<structs.RTEPermissionInfo*> 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(1, 2560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2559
 *     elif tag == structs.T_PartitionCmd:
 *         return create_PartitionCmd(<structs.PartitionCmd*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblEntry:             # <<<<<<<<<<<<<<
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)
 *     elif tag == structs.T_RTEPermissionInfo:
*/
    break;
    case T_RTEPermissionInfo:

    /* "pglast/ast.pyx":2562
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)
 *     elif tag == structs.T_RTEPermissionInfo:
 *         return create_RTEPermissionInfo(<structs.RTEPermissionInfo*> 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_RTEPermissionInfo(((RTEPermissionInfo *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2561
 *     elif tag == structs.T_RangeTblEntry:
 *         return create_RangeTblEntry(<structs.RangeTblEntry*> data, offset_to_index)
 *     elif tag == structs.T_RTEPermissionInfo:             # <<<<<<<<<<<<<<
 *         return create_RTEPermissionInfo(<structs.RTEPermissionInfo*> data, offset_to_index)
 *     elif tag == structs.T_RangeTblFunction:
*/
    break;
    case T_RangeTblFunction:

    /* "pglast/ast.pyx":2564
 *         return create_RTEPermissionInfo(<structs.RTEPermissionInfo*> 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(1, 2564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2563
 *     elif tag == structs.T_RTEPermissionInfo:
 *         return create_RTEPermissionInfo(<structs.RTEPermissionInfo*> 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":2566
 *         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(1, 2566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2565
 *     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":2568
 *         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(1, 2568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2567
 *     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":2570
 *         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(1, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2569
 *     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":2572
 *         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(1, 2572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2571
 *     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":2574
 *         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_RowMarkClause:
 *         return create_RowMarkClause(<structs.RowMarkClause*> 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(1, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2573
 *     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_RowMarkClause:
*/
    break;
    case T_RowMarkClause:

    /* "pglast/ast.pyx":2576
 *         return create_WindowClause(<structs.WindowClause*> data, offset_to_index)
 *     elif tag == structs.T_RowMarkClause:
 *         return create_RowMarkClause(<structs.RowMarkClause*> 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_RowMarkClause(((RowMarkClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2575
 *     elif tag == structs.T_WindowClause:
 *         return create_WindowClause(<structs.WindowClause*> data, offset_to_index)
 *     elif tag == structs.T_RowMarkClause:             # <<<<<<<<<<<<<<
 *         return create_RowMarkClause(<structs.RowMarkClause*> data, offset_to_index)
 *     elif tag == structs.T_WithClause:
*/
    break;
    case T_WithClause:

    /* "pglast/ast.pyx":2578
 *         return create_RowMarkClause(<structs.RowMarkClause*> 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(1, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2577
 *     elif tag == structs.T_RowMarkClause:
 *         return create_RowMarkClause(<structs.RowMarkClause*> 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":2580
 *         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(1, 2580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2579
 *     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":2582
 *         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(1, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2581
 *     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":2584
 *         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(1, 2584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2583
 *     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":2586
 *         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(1, 2586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2585
 *     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":2588
 *         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(1, 2588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2587
 *     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":2590
 *         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_ReturningOption:
 *         return create_ReturningOption(<structs.ReturningOption*> 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(1, 2590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2589
 *     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_ReturningOption:
*/
    break;
    case T_ReturningOption:

    /* "pglast/ast.pyx":2592
 *         return create_MergeWhenClause(<structs.MergeWhenClause*> data, offset_to_index)
 *     elif tag == structs.T_ReturningOption:
 *         return create_ReturningOption(<structs.ReturningOption*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_ReturningClause:
 *         return create_ReturningClause(<structs.ReturningClause*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_ReturningOption(((ReturningOption *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2591
 *     elif tag == structs.T_MergeWhenClause:
 *         return create_MergeWhenClause(<structs.MergeWhenClause*> data, offset_to_index)
 *     elif tag == structs.T_ReturningOption:             # <<<<<<<<<<<<<<
 *         return create_ReturningOption(<structs.ReturningOption*> data, offset_to_index)
 *     elif tag == structs.T_ReturningClause:
*/
    break;
    case T_ReturningClause:

    /* "pglast/ast.pyx":2594
 *         return create_ReturningOption(<structs.ReturningOption*> data, offset_to_index)
 *     elif tag == structs.T_ReturningClause:
 *         return create_ReturningClause(<structs.ReturningClause*> 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_ReturningClause(((ReturningClause *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2593
 *     elif tag == structs.T_ReturningOption:
 *         return create_ReturningOption(<structs.ReturningOption*> data, offset_to_index)
 *     elif tag == structs.T_ReturningClause:             # <<<<<<<<<<<<<<
 *         return create_ReturningClause(<structs.ReturningClause*> data, offset_to_index)
 *     elif tag == structs.T_TriggerTransition:
*/
    break;
    case T_TriggerTransition:

    /* "pglast/ast.pyx":2596
 *         return create_ReturningClause(<structs.ReturningClause*> data, offset_to_index)
 *     elif tag == structs.T_TriggerTransition:
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonOutput:
 *         return create_JsonOutput(<structs.JsonOutput*> 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(1, 2596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2595
 *     elif tag == structs.T_ReturningClause:
 *         return create_ReturningClause(<structs.ReturningClause*> data, offset_to_index)
 *     elif tag == structs.T_TriggerTransition:             # <<<<<<<<<<<<<<
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)
 *     elif tag == structs.T_JsonOutput:
*/
    break;
    case T_JsonOutput:

    /* "pglast/ast.pyx":2598
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)
 *     elif tag == structs.T_JsonOutput:
 *         return create_JsonOutput(<structs.JsonOutput*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonArgument:
 *         return create_JsonArgument(<structs.JsonArgument*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonOutput(((JsonOutput *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2597
 *     elif tag == structs.T_TriggerTransition:
 *         return create_TriggerTransition(<structs.TriggerTransition*> data, offset_to_index)
 *     elif tag == structs.T_JsonOutput:             # <<<<<<<<<<<<<<
 *         return create_JsonOutput(<structs.JsonOutput*> data, offset_to_index)
 *     elif tag == structs.T_JsonArgument:
*/
    break;
    case T_JsonArgument:

    /* "pglast/ast.pyx":2600
 *         return create_JsonOutput(<structs.JsonOutput*> data, offset_to_index)
 *     elif tag == structs.T_JsonArgument:
 *         return create_JsonArgument(<structs.JsonArgument*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonFuncExpr:
 *         return create_JsonFuncExpr(<structs.JsonFuncExpr*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonArgument(((JsonArgument *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2599
 *     elif tag == structs.T_JsonOutput:
 *         return create_JsonOutput(<structs.JsonOutput*> data, offset_to_index)
 *     elif tag == structs.T_JsonArgument:             # <<<<<<<<<<<<<<
 *         return create_JsonArgument(<structs.JsonArgument*> data, offset_to_index)
 *     elif tag == structs.T_JsonFuncExpr:
*/
    break;
    case T_JsonFuncExpr:

    /* "pglast/ast.pyx":2602
 *         return create_JsonArgument(<structs.JsonArgument*> data, offset_to_index)
 *     elif tag == structs.T_JsonFuncExpr:
 *         return create_JsonFuncExpr(<structs.JsonFuncExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonTablePathSpec:
 *         return create_JsonTablePathSpec(<structs.JsonTablePathSpec*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonFuncExpr(((JsonFuncExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2601
 *     elif tag == structs.T_JsonArgument:
 *         return create_JsonArgument(<structs.JsonArgument*> data, offset_to_index)
 *     elif tag == structs.T_JsonFuncExpr:             # <<<<<<<<<<<<<<
 *         return create_JsonFuncExpr(<structs.JsonFuncExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonTablePathSpec:
*/
    break;
    case T_JsonTablePathSpec:

    /* "pglast/ast.pyx":2604
 *         return create_JsonFuncExpr(<structs.JsonFuncExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonTablePathSpec:
 *         return create_JsonTablePathSpec(<structs.JsonTablePathSpec*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonTable:
 *         return create_JsonTable(<structs.JsonTable*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonTablePathSpec(((JsonTablePathSpec *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2603
 *     elif tag == structs.T_JsonFuncExpr:
 *         return create_JsonFuncExpr(<structs.JsonFuncExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonTablePathSpec:             # <<<<<<<<<<<<<<
 *         return create_JsonTablePathSpec(<structs.JsonTablePathSpec*> data, offset_to_index)
 *     elif tag == structs.T_JsonTable:
*/
    break;
    case T_JsonTable:

    /* "pglast/ast.pyx":2606
 *         return create_JsonTablePathSpec(<structs.JsonTablePathSpec*> data, offset_to_index)
 *     elif tag == structs.T_JsonTable:
 *         return create_JsonTable(<structs.JsonTable*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonTableColumn:
 *         return create_JsonTableColumn(<structs.JsonTableColumn*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonTable(((JsonTable *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2605
 *     elif tag == structs.T_JsonTablePathSpec:
 *         return create_JsonTablePathSpec(<structs.JsonTablePathSpec*> data, offset_to_index)
 *     elif tag == structs.T_JsonTable:             # <<<<<<<<<<<<<<
 *         return create_JsonTable(<structs.JsonTable*> data, offset_to_index)
 *     elif tag == structs.T_JsonTableColumn:
*/
    break;
    case T_JsonTableColumn:

    /* "pglast/ast.pyx":2608
 *         return create_JsonTable(<structs.JsonTable*> data, offset_to_index)
 *     elif tag == structs.T_JsonTableColumn:
 *         return create_JsonTableColumn(<structs.JsonTableColumn*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonKeyValue:
 *         return create_JsonKeyValue(<structs.JsonKeyValue*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonTableColumn(((JsonTableColumn *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2607
 *     elif tag == structs.T_JsonTable:
 *         return create_JsonTable(<structs.JsonTable*> data, offset_to_index)
 *     elif tag == structs.T_JsonTableColumn:             # <<<<<<<<<<<<<<
 *         return create_JsonTableColumn(<structs.JsonTableColumn*> data, offset_to_index)
 *     elif tag == structs.T_JsonKeyValue:
*/
    break;
    case T_JsonKeyValue:

    /* "pglast/ast.pyx":2610
 *         return create_JsonTableColumn(<structs.JsonTableColumn*> data, offset_to_index)
 *     elif tag == structs.T_JsonKeyValue:
 *         return create_JsonKeyValue(<structs.JsonKeyValue*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonParseExpr:
 *         return create_JsonParseExpr(<structs.JsonParseExpr*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonKeyValue(((JsonKeyValue *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2609
 *     elif tag == structs.T_JsonTableColumn:
 *         return create_JsonTableColumn(<structs.JsonTableColumn*> data, offset_to_index)
 *     elif tag == structs.T_JsonKeyValue:             # <<<<<<<<<<<<<<
 *         return create_JsonKeyValue(<structs.JsonKeyValue*> data, offset_to_index)
 *     elif tag == structs.T_JsonParseExpr:
*/
    break;
    case T_JsonParseExpr:

    /* "pglast/ast.pyx":2612
 *         return create_JsonKeyValue(<structs.JsonKeyValue*> data, offset_to_index)
 *     elif tag == structs.T_JsonParseExpr:
 *         return create_JsonParseExpr(<structs.JsonParseExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonScalarExpr:
 *         return create_JsonScalarExpr(<structs.JsonScalarExpr*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonParseExpr(((JsonParseExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2611
 *     elif tag == structs.T_JsonKeyValue:
 *         return create_JsonKeyValue(<structs.JsonKeyValue*> data, offset_to_index)
 *     elif tag == structs.T_JsonParseExpr:             # <<<<<<<<<<<<<<
 *         return create_JsonParseExpr(<structs.JsonParseExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonScalarExpr:
*/
    break;
    case T_JsonScalarExpr:

    /* "pglast/ast.pyx":2614
 *         return create_JsonParseExpr(<structs.JsonParseExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonScalarExpr:
 *         return create_JsonScalarExpr(<structs.JsonScalarExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonSerializeExpr:
 *         return create_JsonSerializeExpr(<structs.JsonSerializeExpr*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonScalarExpr(((JsonScalarExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2613
 *     elif tag == structs.T_JsonParseExpr:
 *         return create_JsonParseExpr(<structs.JsonParseExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonScalarExpr:             # <<<<<<<<<<<<<<
 *         return create_JsonScalarExpr(<structs.JsonScalarExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonSerializeExpr:
*/
    break;
    case T_JsonSerializeExpr:

    /* "pglast/ast.pyx":2616
 *         return create_JsonScalarExpr(<structs.JsonScalarExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonSerializeExpr:
 *         return create_JsonSerializeExpr(<structs.JsonSerializeExpr*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonObjectConstructor:
 *         return create_JsonObjectConstructor(<structs.JsonObjectConstructor*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonSerializeExpr(((JsonSerializeExpr *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2615
 *     elif tag == structs.T_JsonScalarExpr:
 *         return create_JsonScalarExpr(<structs.JsonScalarExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonSerializeExpr:             # <<<<<<<<<<<<<<
 *         return create_JsonSerializeExpr(<structs.JsonSerializeExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonObjectConstructor:
*/
    break;
    case T_JsonObjectConstructor:

    /* "pglast/ast.pyx":2618
 *         return create_JsonSerializeExpr(<structs.JsonSerializeExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonObjectConstructor:
 *         return create_JsonObjectConstructor(<structs.JsonObjectConstructor*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonArrayConstructor:
 *         return create_JsonArrayConstructor(<structs.JsonArrayConstructor*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonObjectConstructor(((JsonObjectConstructor *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2617
 *     elif tag == structs.T_JsonSerializeExpr:
 *         return create_JsonSerializeExpr(<structs.JsonSerializeExpr*> data, offset_to_index)
 *     elif tag == structs.T_JsonObjectConstructor:             # <<<<<<<<<<<<<<
 *         return create_JsonObjectConstructor(<structs.JsonObjectConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayConstructor:
*/
    break;
    case T_JsonArrayConstructor:

    /* "pglast/ast.pyx":2620
 *         return create_JsonObjectConstructor(<structs.JsonObjectConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayConstructor:
 *         return create_JsonArrayConstructor(<structs.JsonArrayConstructor*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonArrayQueryConstructor:
 *         return create_JsonArrayQueryConstructor(<structs.JsonArrayQueryConstructor*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonArrayConstructor(((JsonArrayConstructor *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2619
 *     elif tag == structs.T_JsonObjectConstructor:
 *         return create_JsonObjectConstructor(<structs.JsonObjectConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayConstructor:             # <<<<<<<<<<<<<<
 *         return create_JsonArrayConstructor(<structs.JsonArrayConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayQueryConstructor:
*/
    break;
    case T_JsonArrayQueryConstructor:

    /* "pglast/ast.pyx":2622
 *         return create_JsonArrayConstructor(<structs.JsonArrayConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayQueryConstructor:
 *         return create_JsonArrayQueryConstructor(<structs.JsonArrayQueryConstructor*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonAggConstructor:
 *         return create_JsonAggConstructor(<structs.JsonAggConstructor*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonArrayQueryConstructor(((JsonArrayQueryConstructor *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2621
 *     elif tag == structs.T_JsonArrayConstructor:
 *         return create_JsonArrayConstructor(<structs.JsonArrayConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayQueryConstructor:             # <<<<<<<<<<<<<<
 *         return create_JsonArrayQueryConstructor(<structs.JsonArrayQueryConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonAggConstructor:
*/
    break;
    case T_JsonAggConstructor:

    /* "pglast/ast.pyx":2624
 *         return create_JsonArrayQueryConstructor(<structs.JsonArrayQueryConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonAggConstructor:
 *         return create_JsonAggConstructor(<structs.JsonAggConstructor*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonObjectAgg:
 *         return create_JsonObjectAgg(<structs.JsonObjectAgg*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonAggConstructor(((JsonAggConstructor *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2623
 *     elif tag == structs.T_JsonArrayQueryConstructor:
 *         return create_JsonArrayQueryConstructor(<structs.JsonArrayQueryConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonAggConstructor:             # <<<<<<<<<<<<<<
 *         return create_JsonAggConstructor(<structs.JsonAggConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonObjectAgg:
*/
    break;
    case T_JsonObjectAgg:

    /* "pglast/ast.pyx":2626
 *         return create_JsonAggConstructor(<structs.JsonAggConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonObjectAgg:
 *         return create_JsonObjectAgg(<structs.JsonObjectAgg*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     elif tag == structs.T_JsonArrayAgg:
 *         return create_JsonArrayAgg(<structs.JsonArrayAgg*> data, offset_to_index)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_6pglast_6parser_create_JsonObjectAgg(((JsonObjectAgg *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2625
 *     elif tag == structs.T_JsonAggConstructor:
 *         return create_JsonAggConstructor(<structs.JsonAggConstructor*> data, offset_to_index)
 *     elif tag == structs.T_JsonObjectAgg:             # <<<<<<<<<<<<<<
 *         return create_JsonObjectAgg(<structs.JsonObjectAgg*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayAgg:
*/
    break;
    case T_JsonArrayAgg:

    /* "pglast/ast.pyx":2628
 *         return create_JsonObjectAgg(<structs.JsonObjectAgg*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayAgg:
 *         return create_JsonArrayAgg(<structs.JsonArrayAgg*> 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_create_JsonArrayAgg(((JsonArrayAgg *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2627
 *     elif tag == structs.T_JsonObjectAgg:
 *         return create_JsonObjectAgg(<structs.JsonObjectAgg*> data, offset_to_index)
 *     elif tag == structs.T_JsonArrayAgg:             # <<<<<<<<<<<<<<
 *         return create_JsonArrayAgg(<structs.JsonArrayAgg*> data, offset_to_index)
 *     elif tag == structs.T_RawStmt:
*/
    break;
    case T_RawStmt:

    /* "pglast/ast.pyx":2630
 *         return create_JsonArrayAgg(<structs.JsonArrayAgg*> data, offset_to_index)
 *     elif tag == structs.T_RawStmt:
 *         return create_RawStmt(<structs.RawStmt*> 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_RawStmt(((RawStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2629
 *     elif tag == structs.T_JsonArrayAgg:
 *         return create_JsonArrayAgg(<structs.JsonArrayAgg*> data, offset_to_index)
 *     elif tag == structs.T_RawStmt:             # <<<<<<<<<<<<<<
 *         return create_RawStmt(<structs.RawStmt*> data, offset_to_index)
 *     elif tag == structs.T_InsertStmt:
*/
    break;
    case T_InsertStmt:

    /* "pglast/ast.pyx":2632
 *         return create_RawStmt(<structs.RawStmt*> 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(1, 2632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2631
 *     elif tag == structs.T_RawStmt:
 *         return create_RawStmt(<structs.RawStmt*> 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":2634
 *         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(1, 2634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2633
 *     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":2636
 *         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(1, 2636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2635
 *     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":2638
 *         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(1, 2638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2637
 *     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":2640
 *         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_SetOperationStmt:
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> 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(1, 2640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2639
 *     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_SetOperationStmt:
*/
    break;
    case T_SetOperationStmt:

    /* "pglast/ast.pyx":2642
 *         return create_SelectStmt(<structs.SelectStmt*> data, offset_to_index)
 *     elif tag == structs.T_SetOperationStmt:
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> 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_SetOperationStmt(((SetOperationStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2641
 *     elif tag == structs.T_SelectStmt:
 *         return create_SelectStmt(<structs.SelectStmt*> data, offset_to_index)
 *     elif tag == structs.T_SetOperationStmt:             # <<<<<<<<<<<<<<
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> data, offset_to_index)
 *     elif tag == structs.T_ReturnStmt:
*/
    break;
    case T_ReturnStmt:

    /* "pglast/ast.pyx":2644
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> 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(1, 2644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2643
 *     elif tag == structs.T_SetOperationStmt:
 *         return create_SetOperationStmt(<structs.SetOperationStmt*> 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":2646
 *         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_CreateSchemaStmt:
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> 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(1, 2646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2645
 *     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_CreateSchemaStmt:
*/
    break;
    case T_CreateSchemaStmt:

    /* "pglast/ast.pyx":2648
 *         return create_PLAssignStmt(<structs.PLAssignStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSchemaStmt:
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> 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_CreateSchemaStmt(((CreateSchemaStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2647
 *     elif tag == structs.T_PLAssignStmt:
 *         return create_PLAssignStmt(<structs.PLAssignStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSchemaStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterTableStmt:
*/
    break;
    case T_AlterTableStmt:

    /* "pglast/ast.pyx":2650
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> 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(1, 2650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2649
 *     elif tag == structs.T_CreateSchemaStmt:
 *         return create_CreateSchemaStmt(<structs.CreateSchemaStmt*> 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":2652
 *         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_ATAlterConstraint:
 *         return create_ATAlterConstraint(<structs.ATAlterConstraint*> 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(1, 2652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2651
 *     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_ATAlterConstraint:
*/
    break;
    case T_ATAlterConstraint:

    /* "pglast/ast.pyx":2654
 *         return create_AlterTableCmd(<structs.AlterTableCmd*> data, offset_to_index)
 *     elif tag == structs.T_ATAlterConstraint:
 *         return create_ATAlterConstraint(<structs.ATAlterConstraint*> 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_ATAlterConstraint(((ATAlterConstraint *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2653
 *     elif tag == structs.T_AlterTableCmd:
 *         return create_AlterTableCmd(<structs.AlterTableCmd*> data, offset_to_index)
 *     elif tag == structs.T_ATAlterConstraint:             # <<<<<<<<<<<<<<
 *         return create_ATAlterConstraint(<structs.ATAlterConstraint*> data, offset_to_index)
 *     elif tag == structs.T_ReplicaIdentityStmt:
*/
    break;
    case T_ReplicaIdentityStmt:

    /* "pglast/ast.pyx":2656
 *         return create_ATAlterConstraint(<structs.ATAlterConstraint*> data, offset_to_index)
 *     elif tag == structs.T_ReplicaIdentityStmt:
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> 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_ReplicaIdentityStmt(((ReplicaIdentityStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2655
 *     elif tag == structs.T_ATAlterConstraint:
 *         return create_ATAlterConstraint(<structs.ATAlterConstraint*> data, offset_to_index)
 *     elif tag == structs.T_ReplicaIdentityStmt:             # <<<<<<<<<<<<<<
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterCollationStmt:
*/
    break;
    case T_AlterCollationStmt:

    /* "pglast/ast.pyx":2658
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterCollationStmt:
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> 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_AlterCollationStmt(((AlterCollationStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2657
 *     elif tag == structs.T_ReplicaIdentityStmt:
 *         return create_ReplicaIdentityStmt(<structs.ReplicaIdentityStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterCollationStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDomainStmt:
*/
    break;
    case T_AlterDomainStmt:

    /* "pglast/ast.pyx":2660
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDomainStmt:
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> 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_AlterDomainStmt(((AlterDomainStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2659
 *     elif tag == structs.T_AlterCollationStmt:
 *         return create_AlterCollationStmt(<structs.AlterCollationStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDomainStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantStmt:
*/
    break;
    case T_GrantStmt:

    /* "pglast/ast.pyx":2662
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantStmt:
 *         return create_GrantStmt(<structs.GrantStmt*> 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_GrantStmt(((GrantStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2661
 *     elif tag == structs.T_AlterDomainStmt:
 *         return create_AlterDomainStmt(<structs.AlterDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_GrantStmt:             # <<<<<<<<<<<<<<
 *         return create_GrantStmt(<structs.GrantStmt*> data, offset_to_index)
 *     elif tag == structs.T_ObjectWithArgs:
*/
    break;
    case T_ObjectWithArgs:

    /* "pglast/ast.pyx":2664
 *         return create_GrantStmt(<structs.GrantStmt*> 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(1, 2664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2663
 *     elif tag == structs.T_GrantStmt:
 *         return create_GrantStmt(<structs.GrantStmt*> 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":2666
 *         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_GrantRoleStmt:
 *         return create_GrantRoleStmt(<structs.GrantRoleStmt*> 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(1, 2666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2665
 *     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_GrantRoleStmt:
*/
    break;
    case T_GrantRoleStmt:

    /* "pglast/ast.pyx":2668
 *         return create_AccessPriv(<structs.AccessPriv*> 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(1, 2668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2667
 *     elif tag == structs.T_AccessPriv:
 *         return create_AccessPriv(<structs.AccessPriv*> 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":2670
 *         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_CopyStmt:
 *         return create_CopyStmt(<structs.CopyStmt*> 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(1, 2670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2669
 *     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_CopyStmt:
*/
    break;
    case T_CopyStmt:

    /* "pglast/ast.pyx":2672
 *         return create_AlterDefaultPrivilegesStmt(<structs.AlterDefaultPrivilegesStmt*> data, offset_to_index)
 *     elif tag == structs.T_CopyStmt:
 *         return create_CopyStmt(<structs.CopyStmt*> 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_CopyStmt(((CopyStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2671
 *     elif tag == structs.T_AlterDefaultPrivilegesStmt:
 *         return create_AlterDefaultPrivilegesStmt(<structs.AlterDefaultPrivilegesStmt*> data, offset_to_index)
 *     elif tag == structs.T_CopyStmt:             # <<<<<<<<<<<<<<
 *         return create_CopyStmt(<structs.CopyStmt*> data, offset_to_index)
 *     elif tag == structs.T_VariableSetStmt:
*/
    break;
    case T_VariableSetStmt:

    /* "pglast/ast.pyx":2674
 *         return create_CopyStmt(<structs.CopyStmt*> 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(1, 2674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2673
 *     elif tag == structs.T_CopyStmt:
 *         return create_CopyStmt(<structs.CopyStmt*> 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":2676
 *         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_CreateStmt:
 *         return create_CreateStmt(<structs.CreateStmt*> 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(1, 2676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2675
 *     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_CreateStmt:
*/
    break;
    case T_CreateStmt:

    /* "pglast/ast.pyx":2678
 *         return create_VariableShowStmt(<structs.VariableShowStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStmt:
 *         return create_CreateStmt(<structs.CreateStmt*> 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_CreateStmt(((CreateStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2677
 *     elif tag == structs.T_VariableShowStmt:
 *         return create_VariableShowStmt(<structs.VariableShowStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     elif tag == structs.T_Constraint:
*/
    break;
    case T_Constraint:

    /* "pglast/ast.pyx":2680
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     elif tag == structs.T_Constraint:
 *         return create_Constraint(<structs.Constraint*> 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_Constraint(((Constraint *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2679
 *     elif tag == structs.T_CreateStmt:
 *         return create_CreateStmt(<structs.CreateStmt*> data, offset_to_index)
 *     elif tag == structs.T_Constraint:             # <<<<<<<<<<<<<<
 *         return create_Constraint(<structs.Constraint*> data, offset_to_index)
 *     elif tag == structs.T_CreateTableSpaceStmt:
*/
    break;
    case T_CreateTableSpaceStmt:

    /* "pglast/ast.pyx":2682
 *         return create_Constraint(<structs.Constraint*> 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(1, 2682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2681
 *     elif tag == structs.T_Constraint:
 *         return create_Constraint(<structs.Constraint*> 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":2684
 *         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_AlterTableSpaceOptionsStmt:
 *         return create_AlterTableSpaceOptionsStmt(<structs.AlterTableSpaceOptionsStmt*> 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(1, 2684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2683
 *     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_AlterTableSpaceOptionsStmt:
*/
    break;
    case T_AlterTableSpaceOptionsStmt:

    /* "pglast/ast.pyx":2686
 *         return create_DropTableSpaceStmt(<structs.DropTableSpaceStmt*> 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(1, 2686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2685
 *     elif tag == structs.T_DropTableSpaceStmt:
 *         return create_DropTableSpaceStmt(<structs.DropTableSpaceStmt*> 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":2688
 *         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_CreateExtensionStmt:
 *         return create_CreateExtensionStmt(<structs.CreateExtensionStmt*> 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(1, 2688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2687
 *     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_CreateExtensionStmt:
*/
    break;
    case T_CreateExtensionStmt:

    /* "pglast/ast.pyx":2690
 *         return create_AlterTableMoveAllStmt(<structs.AlterTableMoveAllStmt*> 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(1, 2690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2689
 *     elif tag == structs.T_AlterTableMoveAllStmt:
 *         return create_AlterTableMoveAllStmt(<structs.AlterTableMoveAllStmt*> 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":2692
 *         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(1, 2692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2691
 *     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":2694
 *         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_CreateFdwStmt:
 *         return create_CreateFdwStmt(<structs.CreateFdwStmt*> 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(1, 2694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2693
 *     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_CreateFdwStmt:
*/
    break;
    case T_CreateFdwStmt:

    /* "pglast/ast.pyx":2696
 *         return create_AlterExtensionContentsStmt(<structs.AlterExtensionContentsStmt*> 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(1, 2696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2695
 *     elif tag == structs.T_AlterExtensionContentsStmt:
 *         return create_AlterExtensionContentsStmt(<structs.AlterExtensionContentsStmt*> 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":2698
 *         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(1, 2698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2697
 *     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":2700
 *         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(1, 2700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2699
 *     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":2702
 *         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_CreateForeignTableStmt:
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> 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(1, 2702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2701
 *     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_CreateForeignTableStmt:
*/
    break;
    case T_CreateForeignTableStmt:

    /* "pglast/ast.pyx":2704
 *         return create_AlterForeignServerStmt(<structs.AlterForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignTableStmt:
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> 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_CreateForeignTableStmt(((CreateForeignTableStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2703
 *     elif tag == structs.T_AlterForeignServerStmt:
 *         return create_AlterForeignServerStmt(<structs.AlterForeignServerStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateForeignTableStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateUserMappingStmt:
*/
    break;
    case T_CreateUserMappingStmt:

    /* "pglast/ast.pyx":2706
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> 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(1, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2705
 *     elif tag == structs.T_CreateForeignTableStmt:
 *         return create_CreateForeignTableStmt(<structs.CreateForeignTableStmt*> 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":2708
 *         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(1, 2708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2707
 *     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":2710
 *         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_ImportForeignSchemaStmt:
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> 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(1, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2709
 *     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_ImportForeignSchemaStmt:
*/
    break;
    case T_ImportForeignSchemaStmt:

    /* "pglast/ast.pyx":2712
 *         return create_DropUserMappingStmt(<structs.DropUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_ImportForeignSchemaStmt:
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> 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_ImportForeignSchemaStmt(((ImportForeignSchemaStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2711
 *     elif tag == structs.T_DropUserMappingStmt:
 *         return create_DropUserMappingStmt(<structs.DropUserMappingStmt*> data, offset_to_index)
 *     elif tag == structs.T_ImportForeignSchemaStmt:             # <<<<<<<<<<<<<<
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatePolicyStmt:
*/
    break;
    case T_CreatePolicyStmt:

    /* "pglast/ast.pyx":2714
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> 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(1, 2714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2713
 *     elif tag == structs.T_ImportForeignSchemaStmt:
 *         return create_ImportForeignSchemaStmt(<structs.ImportForeignSchemaStmt*> 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":2716
 *         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_CreateAmStmt:
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> 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(1, 2716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2715
 *     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_CreateAmStmt:
*/
    break;
    case T_CreateAmStmt:

    /* "pglast/ast.pyx":2718
 *         return create_AlterPolicyStmt(<structs.AlterPolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateAmStmt:
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> 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_CreateAmStmt(((CreateAmStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2717
 *     elif tag == structs.T_AlterPolicyStmt:
 *         return create_AlterPolicyStmt(<structs.AlterPolicyStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateAmStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTrigStmt:
*/
    break;
    case T_CreateTrigStmt:

    /* "pglast/ast.pyx":2720
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTrigStmt:
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> 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_CreateTrigStmt(((CreateTrigStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2719
 *     elif tag == structs.T_CreateAmStmt:
 *         return create_CreateAmStmt(<structs.CreateAmStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTrigStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateEventTrigStmt:
*/
    break;
    case T_CreateEventTrigStmt:

    /* "pglast/ast.pyx":2722
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> 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(1, 2722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2721
 *     elif tag == structs.T_CreateTrigStmt:
 *         return create_CreateTrigStmt(<structs.CreateTrigStmt*> 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":2724
 *         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_CreatePLangStmt:
 *         return create_CreatePLangStmt(<structs.CreatePLangStmt*> 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(1, 2724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2723
 *     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_CreatePLangStmt:
*/
    break;
    case T_CreatePLangStmt:

    /* "pglast/ast.pyx":2726
 *         return create_AlterEventTrigStmt(<structs.AlterEventTrigStmt*> 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(1, 2726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2725
 *     elif tag == structs.T_AlterEventTrigStmt:
 *         return create_AlterEventTrigStmt(<structs.AlterEventTrigStmt*> 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":2728
 *         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(1, 2728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2727
 *     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":2730
 *         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_AlterRoleSetStmt:
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> 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(1, 2730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2729
 *     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_AlterRoleSetStmt:
*/
    break;
    case T_AlterRoleSetStmt:

    /* "pglast/ast.pyx":2732
 *         return create_AlterRoleStmt(<structs.AlterRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleSetStmt:
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> 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_AlterRoleSetStmt(((AlterRoleSetStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2731
 *     elif tag == structs.T_AlterRoleStmt:
 *         return create_AlterRoleStmt(<structs.AlterRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterRoleSetStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropRoleStmt:
*/
    break;
    case T_DropRoleStmt:

    /* "pglast/ast.pyx":2734
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropRoleStmt:
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> 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_DropRoleStmt(((DropRoleStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2733
 *     elif tag == structs.T_AlterRoleSetStmt:
 *         return create_AlterRoleSetStmt(<structs.AlterRoleSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropRoleStmt:             # <<<<<<<<<<<<<<
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateSeqStmt:
*/
    break;
    case T_CreateSeqStmt:

    /* "pglast/ast.pyx":2736
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> 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(1, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2735
 *     elif tag == structs.T_DropRoleStmt:
 *         return create_DropRoleStmt(<structs.DropRoleStmt*> 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":2738
 *         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_DefineStmt:
 *         return create_DefineStmt(<structs.DefineStmt*> 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(1, 2738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2737
 *     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_DefineStmt:
*/
    break;
    case T_DefineStmt:

    /* "pglast/ast.pyx":2740
 *         return create_AlterSeqStmt(<structs.AlterSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_DefineStmt:
 *         return create_DefineStmt(<structs.DefineStmt*> 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_DefineStmt(((DefineStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2739
 *     elif tag == structs.T_AlterSeqStmt:
 *         return create_AlterSeqStmt(<structs.AlterSeqStmt*> data, offset_to_index)
 *     elif tag == structs.T_DefineStmt:             # <<<<<<<<<<<<<<
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateDomainStmt:
*/
    break;
    case T_CreateDomainStmt:

    /* "pglast/ast.pyx":2742
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateDomainStmt:
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> 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_CreateDomainStmt(((CreateDomainStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2741
 *     elif tag == structs.T_DefineStmt:
 *         return create_DefineStmt(<structs.DefineStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateDomainStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassStmt:
*/
    break;
    case T_CreateOpClassStmt:

    /* "pglast/ast.pyx":2744
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassStmt:
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> 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_CreateOpClassStmt(((CreateOpClassStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2743
 *     elif tag == structs.T_CreateDomainStmt:
 *         return create_CreateDomainStmt(<structs.CreateDomainStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassItem:
*/
    break;
    case T_CreateOpClassItem:

    /* "pglast/ast.pyx":2746
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassItem:
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> 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_CreateOpClassItem(((CreateOpClassItem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2745
 *     elif tag == structs.T_CreateOpClassStmt:
 *         return create_CreateOpClassStmt(<structs.CreateOpClassStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpClassItem:             # <<<<<<<<<<<<<<
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> data, offset_to_index)
 *     elif tag == structs.T_CreateOpFamilyStmt:
*/
    break;
    case T_CreateOpFamilyStmt:

    /* "pglast/ast.pyx":2748
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> 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(1, 2748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2747
 *     elif tag == structs.T_CreateOpClassItem:
 *         return create_CreateOpClassItem(<structs.CreateOpClassItem*> 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":2750
 *         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_DropStmt:
 *         return create_DropStmt(<structs.DropStmt*> 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(1, 2750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2749
 *     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_DropStmt:
*/
    break;
    case T_DropStmt:

    /* "pglast/ast.pyx":2752
 *         return create_AlterOpFamilyStmt(<structs.AlterOpFamilyStmt*> 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(1, 2752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2751
 *     elif tag == structs.T_AlterOpFamilyStmt:
 *         return create_AlterOpFamilyStmt(<structs.AlterOpFamilyStmt*> 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":2754
 *         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(1, 2754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2753
 *     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":2756
 *         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_SecLabelStmt:
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> 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(1, 2756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2755
 *     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_SecLabelStmt:
*/
    break;
    case T_SecLabelStmt:

    /* "pglast/ast.pyx":2758
 *         return create_CommentStmt(<structs.CommentStmt*> data, offset_to_index)
 *     elif tag == structs.T_SecLabelStmt:
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> 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_SecLabelStmt(((SecLabelStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2757
 *     elif tag == structs.T_CommentStmt:
 *         return create_CommentStmt(<structs.CommentStmt*> data, offset_to_index)
 *     elif tag == structs.T_SecLabelStmt:             # <<<<<<<<<<<<<<
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeclareCursorStmt:
*/
    break;
    case T_DeclareCursorStmt:

    /* "pglast/ast.pyx":2760
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeclareCursorStmt:
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> 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_DeclareCursorStmt(((DeclareCursorStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2759
 *     elif tag == structs.T_SecLabelStmt:
 *         return create_SecLabelStmt(<structs.SecLabelStmt*> data, offset_to_index)
 *     elif tag == structs.T_DeclareCursorStmt:             # <<<<<<<<<<<<<<
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClosePortalStmt:
*/
    break;
    case T_ClosePortalStmt:

    /* "pglast/ast.pyx":2762
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClosePortalStmt:
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> 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_ClosePortalStmt(((ClosePortalStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2761
 *     elif tag == structs.T_DeclareCursorStmt:
 *         return create_DeclareCursorStmt(<structs.DeclareCursorStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClosePortalStmt:             # <<<<<<<<<<<<<<
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> data, offset_to_index)
 *     elif tag == structs.T_FetchStmt:
*/
    break;
    case T_FetchStmt:

    /* "pglast/ast.pyx":2764
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> 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(1, 2764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2763
 *     elif tag == structs.T_ClosePortalStmt:
 *         return create_ClosePortalStmt(<structs.ClosePortalStmt*> 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":2766
 *         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_CreateStatsStmt:
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> 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(1, 2766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2765
 *     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_CreateStatsStmt:
*/
    break;
    case T_CreateStatsStmt:

    /* "pglast/ast.pyx":2768
 *         return create_IndexStmt(<structs.IndexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStatsStmt:
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> 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_CreateStatsStmt(((CreateStatsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2767
 *     elif tag == structs.T_IndexStmt:
 *         return create_IndexStmt(<structs.IndexStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateStatsStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_StatsElem:
*/
    break;
    case T_StatsElem:

    /* "pglast/ast.pyx":2770
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_StatsElem:
 *         return create_StatsElem(<structs.StatsElem*> 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_StatsElem(((StatsElem *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2769
 *     elif tag == structs.T_CreateStatsStmt:
 *         return create_CreateStatsStmt(<structs.CreateStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_StatsElem:             # <<<<<<<<<<<<<<
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)
 *     elif tag == structs.T_AlterStatsStmt:
*/
    break;
    case T_AlterStatsStmt:

    /* "pglast/ast.pyx":2772
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)
 *     elif tag == structs.T_AlterStatsStmt:
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> 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_AlterStatsStmt(((AlterStatsStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2771
 *     elif tag == structs.T_StatsElem:
 *         return create_StatsElem(<structs.StatsElem*> data, offset_to_index)
 *     elif tag == structs.T_AlterStatsStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFunctionStmt:
*/
    break;
    case T_CreateFunctionStmt:

    /* "pglast/ast.pyx":2774
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFunctionStmt:
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> 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_CreateFunctionStmt(((CreateFunctionStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2773
 *     elif tag == structs.T_AlterStatsStmt:
 *         return create_AlterStatsStmt(<structs.AlterStatsStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateFunctionStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_FunctionParameter:
*/
    break;
    case T_FunctionParameter:

    /* "pglast/ast.pyx":2776
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_FunctionParameter:
 *         return create_FunctionParameter(<structs.FunctionParameter*> 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_FunctionParameter(((FunctionParameter *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2775
 *     elif tag == structs.T_CreateFunctionStmt:
 *         return create_CreateFunctionStmt(<structs.CreateFunctionStmt*> data, offset_to_index)
 *     elif tag == structs.T_FunctionParameter:             # <<<<<<<<<<<<<<
 *         return create_FunctionParameter(<structs.FunctionParameter*> data, offset_to_index)
 *     elif tag == structs.T_AlterFunctionStmt:
*/
    break;
    case T_AlterFunctionStmt:

    /* "pglast/ast.pyx":2778
 *         return create_FunctionParameter(<structs.FunctionParameter*> 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(1, 2778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2777
 *     elif tag == structs.T_FunctionParameter:
 *         return create_FunctionParameter(<structs.FunctionParameter*> 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":2780
 *         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_InlineCodeBlock:
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> 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(1, 2780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2779
 *     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_InlineCodeBlock:
*/
    break;
    case T_InlineCodeBlock:

    /* "pglast/ast.pyx":2782
 *         return create_DoStmt(<structs.DoStmt*> data, offset_to_index)
 *     elif tag == structs.T_InlineCodeBlock:
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> 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_InlineCodeBlock(((InlineCodeBlock *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2781
 *     elif tag == structs.T_DoStmt:
 *         return create_DoStmt(<structs.DoStmt*> data, offset_to_index)
 *     elif tag == structs.T_InlineCodeBlock:             # <<<<<<<<<<<<<<
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)
 *     elif tag == structs.T_CallStmt:
*/
    break;
    case T_CallStmt:

    /* "pglast/ast.pyx":2784
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)
 *     elif tag == structs.T_CallStmt:
 *         return create_CallStmt(<structs.CallStmt*> 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_CallStmt(((CallStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2783
 *     elif tag == structs.T_InlineCodeBlock:
 *         return create_InlineCodeBlock(<structs.InlineCodeBlock*> data, offset_to_index)
 *     elif tag == structs.T_CallStmt:             # <<<<<<<<<<<<<<
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)
 *     elif tag == structs.T_CallContext:
*/
    break;
    case T_CallContext:

    /* "pglast/ast.pyx":2786
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)
 *     elif tag == structs.T_CallContext:
 *         return create_CallContext(<structs.CallContext*> 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_CallContext(((CallContext *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2785
 *     elif tag == structs.T_CallStmt:
 *         return create_CallStmt(<structs.CallStmt*> data, offset_to_index)
 *     elif tag == structs.T_CallContext:             # <<<<<<<<<<<<<<
 *         return create_CallContext(<structs.CallContext*> data, offset_to_index)
 *     elif tag == structs.T_RenameStmt:
*/
    break;
    case T_RenameStmt:

    /* "pglast/ast.pyx":2788
 *         return create_CallContext(<structs.CallContext*> data, offset_to_index)
 *     elif tag == structs.T_RenameStmt:
 *         return create_RenameStmt(<structs.RenameStmt*> 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_RenameStmt(((RenameStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2787
 *     elif tag == structs.T_CallContext:
 *         return create_CallContext(<structs.CallContext*> data, offset_to_index)
 *     elif tag == structs.T_RenameStmt:             # <<<<<<<<<<<<<<
 *         return create_RenameStmt(<structs.RenameStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterObjectDependsStmt:
*/
    break;
    case T_AlterObjectDependsStmt:

    /* "pglast/ast.pyx":2790
 *         return create_RenameStmt(<structs.RenameStmt*> 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(1, 2790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2789
 *     elif tag == structs.T_RenameStmt:
 *         return create_RenameStmt(<structs.RenameStmt*> 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":2792
 *         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(1, 2792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2791
 *     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":2794
 *         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(1, 2794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2793
 *     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":2796
 *         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(1, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2795
 *     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":2798
 *         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_RuleStmt:
 *         return create_RuleStmt(<structs.RuleStmt*> 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(1, 2798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2797
 *     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_RuleStmt:
*/
    break;
    case T_RuleStmt:

    /* "pglast/ast.pyx":2800
 *         return create_AlterTypeStmt(<structs.AlterTypeStmt*> 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(1, 2800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2799
 *     elif tag == structs.T_AlterTypeStmt:
 *         return create_AlterTypeStmt(<structs.AlterTypeStmt*> 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":2802
 *         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(1, 2802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2801
 *     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":2804
 *         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(1, 2804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2803
 *     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":2806
 *         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(1, 2806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2805
 *     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":2808
 *         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_CompositeTypeStmt:
 *         return create_CompositeTypeStmt(<structs.CompositeTypeStmt*> 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(1, 2808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2807
 *     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_CompositeTypeStmt:
*/
    break;
    case T_CompositeTypeStmt:

    /* "pglast/ast.pyx":2810
 *         return create_TransactionStmt(<structs.TransactionStmt*> 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(1, 2810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2809
 *     elif tag == structs.T_TransactionStmt:
 *         return create_TransactionStmt(<structs.TransactionStmt*> 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":2812
 *         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(1, 2812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2811
 *     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":2814
 *         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(1, 2814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2813
 *     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":2816
 *         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_ViewStmt:
 *         return create_ViewStmt(<structs.ViewStmt*> 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(1, 2816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2815
 *     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_ViewStmt:
*/
    break;
    case T_ViewStmt:

    /* "pglast/ast.pyx":2818
 *         return create_AlterEnumStmt(<structs.AlterEnumStmt*> 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(1, 2818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2817
 *     elif tag == structs.T_AlterEnumStmt:
 *         return create_AlterEnumStmt(<structs.AlterEnumStmt*> 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":2820
 *         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_CreatedbStmt:
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> 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(1, 2820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2819
 *     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_CreatedbStmt:
*/
    break;
    case T_CreatedbStmt:

    /* "pglast/ast.pyx":2822
 *         return create_LoadStmt(<structs.LoadStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatedbStmt:
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> 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_CreatedbStmt(((CreatedbStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2821
 *     elif tag == structs.T_LoadStmt:
 *         return create_LoadStmt(<structs.LoadStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreatedbStmt:             # <<<<<<<<<<<<<<
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterDatabaseStmt:
*/
    break;
    case T_AlterDatabaseStmt:

    /* "pglast/ast.pyx":2824
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> 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(1, 2824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2823
 *     elif tag == structs.T_CreatedbStmt:
 *         return create_CreatedbStmt(<structs.CreatedbStmt*> 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":2826
 *         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(1, 2826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2825
 *     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":2828
 *         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_DropdbStmt:
 *         return create_DropdbStmt(<structs.DropdbStmt*> 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(1, 2828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2827
 *     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_DropdbStmt:
*/
    break;
    case T_DropdbStmt:

    /* "pglast/ast.pyx":2830
 *         return create_AlterDatabaseSetStmt(<structs.AlterDatabaseSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropdbStmt:
 *         return create_DropdbStmt(<structs.DropdbStmt*> 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_DropdbStmt(((DropdbStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2829
 *     elif tag == structs.T_AlterDatabaseSetStmt:
 *         return create_AlterDatabaseSetStmt(<structs.AlterDatabaseSetStmt*> data, offset_to_index)
 *     elif tag == structs.T_DropdbStmt:             # <<<<<<<<<<<<<<
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSystemStmt:
*/
    break;
    case T_AlterSystemStmt:

    /* "pglast/ast.pyx":2832
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSystemStmt:
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> 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_AlterSystemStmt(((AlterSystemStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2831
 *     elif tag == structs.T_DropdbStmt:
 *         return create_DropdbStmt(<structs.DropdbStmt*> data, offset_to_index)
 *     elif tag == structs.T_AlterSystemStmt:             # <<<<<<<<<<<<<<
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClusterStmt:
*/
    break;
    case T_ClusterStmt:

    /* "pglast/ast.pyx":2834
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClusterStmt:
 *         return create_ClusterStmt(<structs.ClusterStmt*> 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_ClusterStmt(((ClusterStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2833
 *     elif tag == structs.T_AlterSystemStmt:
 *         return create_AlterSystemStmt(<structs.AlterSystemStmt*> data, offset_to_index)
 *     elif tag == structs.T_ClusterStmt:             # <<<<<<<<<<<<<<
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumStmt:
*/
    break;
    case T_VacuumStmt:

    /* "pglast/ast.pyx":2836
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumStmt:
 *         return create_VacuumStmt(<structs.VacuumStmt*> 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_VacuumStmt(((VacuumStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2835
 *     elif tag == structs.T_ClusterStmt:
 *         return create_ClusterStmt(<structs.ClusterStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumStmt:             # <<<<<<<<<<<<<<
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumRelation:
*/
    break;
    case T_VacuumRelation:

    /* "pglast/ast.pyx":2838
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumRelation:
 *         return create_VacuumRelation(<structs.VacuumRelation*> 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_VacuumRelation(((VacuumRelation *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2837
 *     elif tag == structs.T_VacuumStmt:
 *         return create_VacuumStmt(<structs.VacuumStmt*> data, offset_to_index)
 *     elif tag == structs.T_VacuumRelation:             # <<<<<<<<<<<<<<
 *         return create_VacuumRelation(<structs.VacuumRelation*> data, offset_to_index)
 *     elif tag == structs.T_ExplainStmt:
*/
    break;
    case T_ExplainStmt:

    /* "pglast/ast.pyx":2840
 *         return create_VacuumRelation(<structs.VacuumRelation*> 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(1, 2840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2839
 *     elif tag == structs.T_VacuumRelation:
 *         return create_VacuumRelation(<structs.VacuumRelation*> 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":2842
 *         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_RefreshMatViewStmt:
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> 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(1, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2841
 *     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_RefreshMatViewStmt:
*/
    break;
    case T_RefreshMatViewStmt:

    /* "pglast/ast.pyx":2844
 *         return create_CreateTableAsStmt(<structs.CreateTableAsStmt*> data, offset_to_index)
 *     elif tag == structs.T_RefreshMatViewStmt:
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> 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_RefreshMatViewStmt(((RefreshMatViewStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2843
 *     elif tag == structs.T_CreateTableAsStmt:
 *         return create_CreateTableAsStmt(<structs.CreateTableAsStmt*> data, offset_to_index)
 *     elif tag == structs.T_RefreshMatViewStmt:             # <<<<<<<<<<<<<<
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_CheckPointStmt:
*/
    break;
    case T_CheckPointStmt:

    /* "pglast/ast.pyx":2846
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_CheckPointStmt:
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> 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_CheckPointStmt(((CheckPointStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2845
 *     elif tag == structs.T_RefreshMatViewStmt:
 *         return create_RefreshMatViewStmt(<structs.RefreshMatViewStmt*> data, offset_to_index)
 *     elif tag == structs.T_CheckPointStmt:             # <<<<<<<<<<<<<<
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)
 *     elif tag == structs.T_DiscardStmt:
*/
    break;
    case T_DiscardStmt:

    /* "pglast/ast.pyx":2848
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)
 *     elif tag == structs.T_DiscardStmt:
 *         return create_DiscardStmt(<structs.DiscardStmt*> 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_DiscardStmt(((DiscardStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2847
 *     elif tag == structs.T_CheckPointStmt:
 *         return create_CheckPointStmt(<structs.CheckPointStmt*> data, offset_to_index)
 *     elif tag == structs.T_DiscardStmt:             # <<<<<<<<<<<<<<
 *         return create_DiscardStmt(<structs.DiscardStmt*> data, offset_to_index)
 *     elif tag == structs.T_LockStmt:
*/
    break;
    case T_LockStmt:

    /* "pglast/ast.pyx":2850
 *         return create_DiscardStmt(<structs.DiscardStmt*> 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(1, 2850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2849
 *     elif tag == structs.T_DiscardStmt:
 *         return create_DiscardStmt(<structs.DiscardStmt*> 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":2852
 *         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(1, 2852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2851
 *     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":2854
 *         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_CreateConversionStmt:
 *         return create_CreateConversionStmt(<structs.CreateConversionStmt*> 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(1, 2854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2853
 *     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_CreateConversionStmt:
*/
    break;
    case T_CreateConversionStmt:

    /* "pglast/ast.pyx":2856
 *         return create_ReindexStmt(<structs.ReindexStmt*> 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(1, 2856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2855
 *     elif tag == structs.T_ReindexStmt:
 *         return create_ReindexStmt(<structs.ReindexStmt*> 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":2858
 *         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_CreateTransformStmt:
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> 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(1, 2858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2857
 *     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_CreateTransformStmt:
*/
    break;
    case T_CreateTransformStmt:

    /* "pglast/ast.pyx":2860
 *         return create_CreateCastStmt(<structs.CreateCastStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTransformStmt:
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> 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_CreateTransformStmt(((CreateTransformStmt *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2859
 *     elif tag == structs.T_CreateCastStmt:
 *         return create_CreateCastStmt(<structs.CreateCastStmt*> data, offset_to_index)
 *     elif tag == structs.T_CreateTransformStmt:             # <<<<<<<<<<<<<<
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> data, offset_to_index)
 *     elif tag == structs.T_PrepareStmt:
*/
    break;
    case T_PrepareStmt:

    /* "pglast/ast.pyx":2862
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> 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(1, 2862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2861
 *     elif tag == structs.T_CreateTransformStmt:
 *         return create_CreateTransformStmt(<structs.CreateTransformStmt*> 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":2864
 *         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(1, 2864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2863
 *     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":2866
 *         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_DropOwnedStmt:
 *         return create_DropOwnedStmt(<structs.DropOwnedStmt*> 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(1, 2866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2865
 *     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_DropOwnedStmt:
*/
    break;
    case T_DropOwnedStmt:

    /* "pglast/ast.pyx":2868
 *         return create_DeallocateStmt(<structs.DeallocateStmt*> 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(1, 2868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2867
 *     elif tag == structs.T_DeallocateStmt:
 *         return create_DeallocateStmt(<structs.DeallocateStmt*> 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":2870
 *         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_AlterTSDictionaryStmt:
 *         return create_AlterTSDictionaryStmt(<structs.AlterTSDictionaryStmt*> 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(1, 2870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2869
 *     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_AlterTSDictionaryStmt:
*/
    break;
    case T_AlterTSDictionaryStmt:

    /* "pglast/ast.pyx":2872
 *         return create_ReassignOwnedStmt(<structs.ReassignOwnedStmt*> 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(1, 2872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2871
 *     elif tag == structs.T_ReassignOwnedStmt:
 *         return create_ReassignOwnedStmt(<structs.ReassignOwnedStmt*> 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":2874
 *         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_PublicationTable:
 *         return create_PublicationTable(<structs.PublicationTable*> 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(1, 2874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2873
 *     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_PublicationTable:
*/
    break;
    case T_PublicationTable:

    /* "pglast/ast.pyx":2876
 *         return create_AlterTSConfigurationStmt(<structs.AlterTSConfigurationStmt*> data, offset_to_index)
 *     elif tag == structs.T_PublicationTable:
 *         return create_PublicationTable(<structs.PublicationTable*> 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_PublicationTable(((PublicationTable *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2875
 *     elif tag == structs.T_AlterTSConfigurationStmt:
 *         return create_AlterTSConfigurationStmt(<structs.AlterTSConfigurationStmt*> data, offset_to_index)
 *     elif tag == structs.T_PublicationTable:             # <<<<<<<<<<<<<<
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)
 *     elif tag == structs.T_PublicationObjSpec:
*/
    break;
    case T_PublicationObjSpec:

    /* "pglast/ast.pyx":2878
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)
 *     elif tag == structs.T_PublicationObjSpec:
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> 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_PublicationObjSpec(((PublicationObjSpec *)__pyx_v_data), __pyx_v_offset_to_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2877
 *     elif tag == structs.T_PublicationTable:
 *         return create_PublicationTable(<structs.PublicationTable*> data, offset_to_index)
 *     elif tag == structs.T_PublicationObjSpec:             # <<<<<<<<<<<<<<
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> data, offset_to_index)
 *     elif tag == structs.T_CreatePublicationStmt:
*/
    break;
    case T_CreatePublicationStmt:

    /* "pglast/ast.pyx":2880
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> 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(1, 2880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2879
 *     elif tag == structs.T_PublicationObjSpec:
 *         return create_PublicationObjSpec(<structs.PublicationObjSpec*> 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":2882
 *         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(1, 2882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2881
 *     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":2884
 *         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(1, 2884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2883
 *     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":2886
 *         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(1, 2886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2885
 *     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":2888
 *         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_Integer:
 *         return create_Integer(<structs.Integer*> 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(1, 2888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2887
 *     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_Integer:
*/
    break;
    case T_Integer:

    /* "pglast/ast.pyx":2890
 *         return create_DropSubscriptionStmt(<structs.DropSubscriptionStmt*> 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(1, 2890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2889
 *     elif tag == structs.T_DropSubscriptionStmt:
 *         return create_DropSubscriptionStmt(<structs.DropSubscriptionStmt*> 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":2892
 *         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(1, 2892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2891
 *     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":2894
 *         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(1, 2894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2893
 *     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":2896
 *         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(1, 2896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2895
 *     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":2898
 *         return create_String(<structs.String*> data, offset_to_index)
 *     elif tag == structs.T_BitString:
 *         return create_BitString(<structs.BitString*> data, offset_to_index)             # <<<<<<<<<<<<<<
 *     raise ValueError("Unhandled tag: %s" % tag)
*/
    __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(1, 2898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pglast/ast.pyx":2897
 *     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)
 *     raise ValueError("Unhandled tag: %s" % tag)
*/
    break;
    default: break;
  }

  /* "pglast/ast.pyx":2899
 *     elif tag == structs.T_BitString:
 *         return create_BitString(<structs.BitString*> data, offset_to_index)
 *     raise ValueError("Unhandled tag: %s" % tag)             # <<<<<<<<<<<<<<
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unhandled_tag_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(1, 2899, __pyx_L1_error)

  /* "pglast/ast.pyx":2364
 * 
 * 
 * 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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 28, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 28, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 28, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 28, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 28, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 28, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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 */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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(0, 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_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 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_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_at_index, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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(0, 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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 40, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 40, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 40, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 40, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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 */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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(0, 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_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 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_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_at_position, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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(0, 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":232
 *     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 Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_s,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 232, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 232, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 232, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 232, __pyx_L3_error)
    }
    __pyx_v_s = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 232, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 232, __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;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __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;
  size_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pglast/parser.pyx":233
 * 
 *     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":234
 *     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":237
 *         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(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_disps = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":238
 * 
 *         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(0, 238, __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(0, 238, __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":239
 *         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 = __Pyx_PyUnicode_FromOrdinal(__pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyBytes_GET_SIZE(__pyx_t_9); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_c_len_in_utf8 = __pyx_t_10;

    /* "pglast/parser.pyx":240
 *         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":241
 *             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":242
 *             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_PyLong_From_unsigned_long(__pyx_v_ofs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyLong_From_unsigned_long(__pyx_v_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 242, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_9);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 242, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 242, __pyx_L1_error);
        __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(0, 242, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "pglast/parser.pyx":243
 *                 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":244
 *                     disps.append((ofs, idx))
 *                     c_len_in_utf8 -= 1
 *                     ofs += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 ofs += 1
*/
        __pyx_v_ofs = (__pyx_v_ofs + 1);
      }

      /* "pglast/parser.pyx":240
 *         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":246
 *                     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":247
 *             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":248
 *                 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":249
 *             idx += 1
 *         self.max_offset = ofs - 1
 *         self.displacements = tuple(reversed(disps))             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, offset):
*/
  __pyx_t_1 = NULL;
  __pyx_t_14 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_disps};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_reversed, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __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":232
 *     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":251
 *         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 Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 251, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < (0)) __PYX_ERR(0, 251, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, i); __PYX_ERR(0, 251, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 251, __pyx_L3_error)
    }
    __pyx_v_offset = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 251, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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 */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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":252
 * 
 *     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_mstate_global->__pyx_int_0, __pyx_v_offset, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyLong_From_unsigned_long(__pyx_v_self->max_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __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(0, 252, __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(0, 252, __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":256
 *             # 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":252
 * 
 *     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":258
 *             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(0, 258, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->displacements; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 258, __pyx_L1_error)
      #endif
      if (__pyx_t_5 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5));
    #else
    __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5);
    #endif
    ++__pyx_t_5;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    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(0, 258, __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_INCREF(__pyx_t_6);
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_7);
      } else {
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_7);
      }
      #else
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __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(0, 258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __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(0, 258, __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(0, 258, __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":259
 * 
 *         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(0, 259, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "pglast/parser.pyx":260
 *         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(0, 260, __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(0, 260, __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":259
 * 
 *         for o, i in self.displacements:
 *             if o <= offset:             # <<<<<<<<<<<<<<
 *                 return i + (offset - o)
 * 
*/
    }

    /* "pglast/parser.pyx":258
 *             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":262
 *                 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":251
 *         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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); 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;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = 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 and _dict:
*/
  __pyx_t_1 = __Pyx_PyLong_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);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->displacements) != (0)) __PYX_ERR(2, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 5, __pyx_L1_error);
  __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 and _dict:
 *         state += (_dict,)
*/
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_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 and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 7, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
 *         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);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error);
    __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 and _dict:
 *         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 and _dict:             # <<<<<<<<<<<<<<
 *         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_mstate_global->__pyx_n_u_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))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_37136258);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_37136258);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_37136258) != (0)) __PYX_ERR(2, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 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_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Displacements); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_37136258);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_37136258);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_int_37136258) != (0)) __PYX_ERR(2, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error);
    __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_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(2, 15, __pyx_L1_error);
    __pyx_t_5 = 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_5);
  __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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(2, 16, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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 */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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;
  PyObject *__pyx_t_2 = 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)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = __pyx_v___pyx_state;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
    __PYX_ERR(2, 17, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_6pglast_6parser___pyx_unpickle_Displacements__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(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_XDECREF(__pyx_t_2);
  __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":265
 * 
 * 
 * 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;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_postgresql_version (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __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;
  long __pyx_v_major;
  long __pyx_v_minor;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_ctuple_long__and_long __pyx_t_1;
  long __pyx_t_2;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_postgresql_version", 0);

  /* "pglast/parser.pyx":268
 *     "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":269
 * 
 *     version = PG_VERSION_NUM
 *     major, minor = divmod(version, 10_000)             # <<<<<<<<<<<<<<
 *     return (major, minor)
 * 
*/
  __pyx_t_1 = __Pyx_divmod_int_long(__pyx_v_version, 0x2710); if (unlikely(memcmp(&__pyx_t_1, &__Pyx_divmod_ERROR_VALUE_int_long, sizeof(__pyx_t_1)) == 0 && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1.f0;
  __pyx_t_3 = __pyx_t_1.f1;
  __pyx_v_major = __pyx_t_2;
  __pyx_v_minor = __pyx_t_3;

  /* "pglast/parser.pyx":270
 *     version = PG_VERSION_NUM
 *     major, minor = divmod(version, 10_000)
 *     return (major, minor)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_v_major); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_v_minor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 270, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 270, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "pglast/parser.pyx":265
 * 
 * 
 * def get_postgresql_version():             # <<<<<<<<<<<<<<
 *     "Return the ``PostgreSQL`` version as a tuple (`major`, `minor`)."
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pglast.parser.get_postgresql_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":273
 * 
 * 
 * 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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_query,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 273, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_sql", 0) < (0)) __PYX_ERR(0, 273, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_sql", 1, 1, 1, i); __PYX_ERR(0, 273, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 273, __pyx_L3_error)
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_sql", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 273, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 273, __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;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __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;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  char const *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char *__pyx_t_9;
  Py_ssize_t __pyx_t_10;
  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;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_sql", 0);

  /* "pglast/parser.pyx":281
 *     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(0, 281, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":282
 * 
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_query};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":283
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     mctx = pg_query_enter_memory_context()
*/
  __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_4;

  /* "pglast/parser.pyx":285
 *     cstring = utf8
 * 
 *     mctx = pg_query_enter_memory_context()             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_v_mctx = pg_query_enter_memory_context();

  /* "pglast/parser.pyx":287
 *     mctx = pg_query_enter_memory_context()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_raw_parse(cstring, PG_QUERY_PARSE_DEFAULT)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":288
 * 
 *     with nogil:
 *         parsed = pg_query_raw_parse(cstring, PG_QUERY_PARSE_DEFAULT)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_parsed = pg_query_raw_parse(__pyx_v_cstring, PG_QUERY_PARSE_DEFAULT);
      }

      /* "pglast/parser.pyx":287
 *     mctx = pg_query_enter_memory_context()
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_raw_parse(cstring, PG_QUERY_PARSE_DEFAULT)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":290
 *         parsed = pg_query_raw_parse(cstring, PG_QUERY_PARSE_DEFAULT)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.tree is not NULL:
 *             stmts = PyTuple_New(parsed.tree.length)
*/
  /*try:*/ {

    /* "pglast/parser.pyx":291
 * 
 *     try:
 *         if parsed.tree is not NULL:             # <<<<<<<<<<<<<<
 *             stmts = PyTuple_New(parsed.tree.length)
 *             for i in range(parsed.tree.length):
*/
    __pyx_t_5 = (__pyx_v_parsed.tree != NULL);
    if (__pyx_t_5) {

      /* "pglast/parser.pyx":292
 *     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(0, 292, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_stmts = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":293
 *         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_6 = __pyx_v_parsed.tree->length;
      __pyx_t_7 = __pyx_t_6;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

        /* "pglast/parser.pyx":294
 *             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(0, 294, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pglast/parser.pyx":295
 *             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":296
 *                 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":297
 *                 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":291
 * 
 *     try:
 *         if parsed.tree is not NULL:             # <<<<<<<<<<<<<<
 *             stmts = PyTuple_New(parsed.tree.length)
 *             for i in range(parsed.tree.length):
*/
    }

    /* "pglast/parser.pyx":298
 *                 PyTuple_SET_ITEM(stmts, i, item)
 *             return stmts
 *         elif parsed.error is NULL:             # <<<<<<<<<<<<<<
 *             return ()
 *         else:
*/
    __pyx_t_5 = (__pyx_v_parsed.error == NULL);
    if (likely(__pyx_t_5)) {

      /* "pglast/parser.pyx":299
 *             return stmts
 *         elif parsed.error is NULL:
 *             return ()             # <<<<<<<<<<<<<<
 *         else:
 *             message = parsed.error.message.decode('utf-8')
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
      __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
      goto __pyx_L6_return;

      /* "pglast/parser.pyx":298
 *                 PyTuple_SET_ITEM(stmts, i, item)
 *             return stmts
 *         elif parsed.error is NULL:             # <<<<<<<<<<<<<<
 *             return ()
 *         else:
*/
    }

    /* "pglast/parser.pyx":301
 *             return ()
 *         else:
 *             message = parsed.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 *     finally:
*/
    /*else*/ {
      __pyx_t_9 = __pyx_v_parsed.error->message;
      __pyx_t_10 = __Pyx_ssize_strlen(__pyx_t_9); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 301, __pyx_L7_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_9, 0, __pyx_t_10, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __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":302
 *         else:
 *             message = parsed.error.message.decode('utf-8')
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))             # <<<<<<<<<<<<<<
 *     finally:
 *         pg_query_exit_memory_context(mctx);
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_14 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_15 = __Pyx_PyLong_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 302, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_14))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
        assert(__pyx_t_13);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
        __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 302, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_12);
      }
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_message, __pyx_t_12};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 302, __pyx_L7_error)
    }
  }

  /* "pglast/parser.pyx":304
 *             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_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_17);
      __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_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        pg_query_exit_memory_context(__pyx_v_mctx);
      }
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_22 = __pyx_r;
      __pyx_r = 0;
      pg_query_exit_memory_context(__pyx_v_mctx);
      __pyx_r = __pyx_t_22;
      __pyx_t_22 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":273
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __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":307
 * 
 * 
 * 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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_query,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 307, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 307, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_sql_json", 0) < (0)) __PYX_ERR(0, 307, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_sql_json", 1, 1, 1, i); __PYX_ERR(0, 307, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 307, __pyx_L3_error)
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_sql_json", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 307, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 307, __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;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __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;
  int __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_sql_json", 0);

  /* "pglast/parser.pyx":313
 *     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(0, 313, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":314
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":316
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse(cstring)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":317
 * 
 *     with nogil:
 *         parsed = pg_query_parse(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_parsed = pg_query_parse(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":316
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse(cstring)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":319
 *         parsed = pg_query_parse(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":320
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
*/
    __pyx_t_3 = (__pyx_v_parsed.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":321
 *     try:
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             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_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 321, __pyx_L7_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __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":322
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
*/
      __pyx_t_6 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_query};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L7_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_1);
      }
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":323
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         return parsed.parse_tree.decode('utf-8')
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 323, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_12 = __Pyx_PyLong_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 323, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
        __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_message, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 323, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 323, __pyx_L7_error)

      /* "pglast/parser.pyx":320
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
*/
    }

    /* "pglast/parser.pyx":325
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 *         return parsed.parse_tree.decode('utf-8')             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_parsed.parse_tree;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 325, __pyx_L7_error)
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __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":327
 *         return parsed.parse_tree.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_parse_result(parsed)
 * 
*/
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      __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_XGOTREF(__pyx_t_21);
      __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":328
 *     finally:
 *         with nogil:
 *             pg_query_free_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
              pg_query_free_parse_result(__pyx_v_parsed);
            }

            /* "pglast/parser.pyx":327
 *         return parsed.parse_tree.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_parse_result(parsed)
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":328
 *     finally:
 *         with nogil:
 *             pg_query_free_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
            pg_query_free_parse_result(__pyx_v_parsed);
          }

          /* "pglast/parser.pyx":327
 *         return parsed.parse_tree.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_parse_result(parsed)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":307
 * 
 * 
 * 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_6);
  __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_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":331
 * 
 * 
 * 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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_query,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 331, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 331, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_sql_protobuf", 0) < (0)) __PYX_ERR(0, 331, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_sql_protobuf", 1, 1, 1, i); __PYX_ERR(0, 331, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 331, __pyx_L3_error)
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_sql_protobuf", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 331, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 331, __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;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __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;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_sql_protobuf", 0);

  /* "pglast/parser.pyx":337
 *     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(0, 337, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":338
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":340
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_protobuf(cstring)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":341
 * 
 *     with nogil:
 *         parsed = pg_query_parse_protobuf(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_parsed = pg_query_parse_protobuf(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":340
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_protobuf(cstring)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":343
 *         parsed = pg_query_parse_protobuf(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":344
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf-8')
 *             cursorpos = parsed.error.cursorpos
*/
    __pyx_t_3 = (__pyx_v_parsed.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":345
 *     try:
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             cursorpos = parsed.error.cursorpos
 *             offset_to_index = Displacements(query)
*/
      __pyx_t_4 = __pyx_v_parsed.error->message;
      __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 345, __pyx_L7_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __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":346
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')
 *             cursorpos = parsed.error.cursorpos             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
*/
      __pyx_t_6 = __pyx_v_parsed.error->cursorpos;
      __pyx_v_cursorpos = __pyx_t_6;

      /* "pglast/parser.pyx":347
 *             message = parsed.error.message.decode('utf-8')
 *             cursorpos = parsed.error.cursorpos
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
*/
      __pyx_t_7 = NULL;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_query};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L7_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_1);
      }
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":348
 *             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_t_7 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 348, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_12 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_13 = __Pyx_PyLong_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 348, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_11);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_13};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 348, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_message, __pyx_t_10};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 348, __pyx_L7_error)

      /* "pglast/parser.pyx":344
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf-8')
 *             cursorpos = parsed.error.cursorpos
*/
    }

    /* "pglast/parser.pyx":350
 *             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(0, 350, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":352
 *         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_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      __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_XGOTREF(__pyx_t_21);
      __pyx_t_6 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":353
 *     finally:
 *         with nogil:
 *             pg_query_free_protobuf_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
              pg_query_free_protobuf_parse_result(__pyx_v_parsed);
            }

            /* "pglast/parser.pyx":352
 *         return PyBytes_FromStringAndSize(parsed.parse_tree.data, parsed.parse_tree.len)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_protobuf_parse_result(parsed)
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":353
 *     finally:
 *         with nogil:
 *             pg_query_free_protobuf_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
            pg_query_free_protobuf_parse_result(__pyx_v_parsed);
          }

          /* "pglast/parser.pyx":352
 *         return PyBytes_FromStringAndSize(parsed.parse_tree.data, parsed.parse_tree.len)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_protobuf_parse_result(parsed)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":331
 * 
 * 
 * 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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("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":356
 * 
 * 
 * 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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_query,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 356, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_plpgsql_json", 0) < (0)) __PYX_ERR(0, 356, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_plpgsql_json", 1, 1, 1, i); __PYX_ERR(0, 356, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 356, __pyx_L3_error)
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_plpgsql_json", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 356, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 356, __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;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __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;
  int __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_plpgsql_json", 0);

  /* "pglast/parser.pyx":362
 *     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(0, 362, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":363
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":365
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_plpgsql(cstring)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":366
 * 
 *     with nogil:
 *         parsed = pg_query_parse_plpgsql(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_parsed = pg_query_parse_plpgsql(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":365
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         parsed = pg_query_parse_plpgsql(cstring)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":368
 *         parsed = pg_query_parse_plpgsql(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":369
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
*/
    __pyx_t_3 = (__pyx_v_parsed.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":370
 *     try:
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             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_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 370, __pyx_L7_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __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":371
 *         if parsed.error:
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
*/
      __pyx_t_6 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_query};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L7_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_1);
      }
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":372
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         return parsed.plpgsql_funcs.decode('utf-8')
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 372, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_12 = __Pyx_PyLong_From_long((__pyx_v_parsed.error->cursorpos - 1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 372, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
        __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 372, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_message, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 372, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 372, __pyx_L7_error)

      /* "pglast/parser.pyx":369
 * 
 *     try:
 *         if parsed.error:             # <<<<<<<<<<<<<<
 *             message = parsed.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
*/
    }

    /* "pglast/parser.pyx":374
 *             raise ParseError(message, offset_to_index(parsed.error.cursorpos-1))
 * 
 *         return parsed.plpgsql_funcs.decode('utf-8')             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_parsed.plpgsql_funcs;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 374, __pyx_L7_error)
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __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":376
 *         return parsed.plpgsql_funcs.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_plpgsql_parse_result(parsed)
 * 
*/
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      __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_XGOTREF(__pyx_t_21);
      __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":377
 *     finally:
 *         with nogil:
 *             pg_query_free_plpgsql_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
              pg_query_free_plpgsql_parse_result(__pyx_v_parsed);
            }

            /* "pglast/parser.pyx":376
 *         return parsed.plpgsql_funcs.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_plpgsql_parse_result(parsed)
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":377
 *     finally:
 *         with nogil:
 *             pg_query_free_plpgsql_parse_result(parsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
            pg_query_free_plpgsql_parse_result(__pyx_v_parsed);
          }

          /* "pglast/parser.pyx":376
 *         return parsed.plpgsql_funcs.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_plpgsql_parse_result(parsed)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":356
 * 
 * 
 * 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_6);
  __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_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":380
 * 
 * 
 * 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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_query,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 380, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 380, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fingerprint", 0) < (0)) __PYX_ERR(0, 380, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fingerprint", 1, 1, 1, i); __PYX_ERR(0, 380, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 380, __pyx_L3_error)
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fingerprint", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 380, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 380, __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;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __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;
  int __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  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;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fingerprint", 0);

  /* "pglast/parser.pyx":386
 *     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(0, 386, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":387
 * 
 *     utf8 = query.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":389
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result = pg_query_fingerprint(cstring)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":390
 * 
 *     with nogil:
 *         result = pg_query_fingerprint(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_result = pg_query_fingerprint(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":389
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         result = pg_query_fingerprint(cstring)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":392
 *         result = pg_query_fingerprint(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if result.error:
 *             message = result.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":393
 * 
 *     try:
 *         if result.error:             # <<<<<<<<<<<<<<
 *             message = result.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
*/
    __pyx_t_3 = (__pyx_v_result.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":394
 *     try:
 *         if result.error:
 *             message = result.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             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_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 394, __pyx_L7_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __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":395
 *         if result.error:
 *             message = result.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(result.error.cursorpos-1))
 * 
*/
      __pyx_t_6 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_query};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L7_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_1);
      }
      __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":396
 *             message = result.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
 *             raise ParseError(message, offset_to_index(result.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         return result.fingerprint_str.decode('ascii')
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 396, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_12 = __Pyx_PyLong_From_long((__pyx_v_result.error->cursorpos - 1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 396, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
        __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 396, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_message, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 396, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 396, __pyx_L7_error)

      /* "pglast/parser.pyx":393
 * 
 *     try:
 *         if result.error:             # <<<<<<<<<<<<<<
 *             message = result.error.message.decode('utf-8')
 *             offset_to_index = Displacements(query)
*/
    }

    /* "pglast/parser.pyx":398
 *             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_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 398, __pyx_L7_error)
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __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":400
 *         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_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      __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_XGOTREF(__pyx_t_21);
      __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":401
 *     finally:
 *         with nogil:
 *             pg_query_free_fingerprint_result(result)             # <<<<<<<<<<<<<<
 * 
 * 
*/
              pg_query_free_fingerprint_result(__pyx_v_result);
            }

            /* "pglast/parser.pyx":400
 *         return result.fingerprint_str.decode('ascii')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_fingerprint_result(result)
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":401
 *     finally:
 *         with nogil:
 *             pg_query_free_fingerprint_result(result)             # <<<<<<<<<<<<<<
 * 
 * 
*/
            pg_query_free_fingerprint_result(__pyx_v_result);
          }

          /* "pglast/parser.pyx":400
 *         return result.fingerprint_str.decode('ascii')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_fingerprint_result(result)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":380
 * 
 * 
 * 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_6);
  __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.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":404
 * 
 * 
 * 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(*)(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stmts,&__pyx_mstate_global->__pyx_n_u_with_parser,&__pyx_mstate_global->__pyx_n_u_only_slices,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 404, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 404, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 404, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 404, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "split", 0) < (0)) __PYX_ERR(0, 404, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("split", 0, 1, 3, i); __PYX_ERR(0, 404, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 404, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 404, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 404, __pyx_L3_error)
        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(0, 404, __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(0, 404, __pyx_L3_error)
    } else {
      __pyx_v_only_slices = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("split", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 404, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 404, __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;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __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_start;
  int __pyx_v_end;
  struct __pyx_obj_6pglast_6parser_Displacements *__pyx_v_offset_to_index = 0;
  PyObject *__pyx_v_stmt = 0;
  Py_ssize_t __pyx_v_start_index;
  Py_ssize_t __pyx_v_leading_whitespace;
  Py_ssize_t __pyx_v_end_index;
  PyObject *__pyx_v_utf8 = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_v_result = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __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;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __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("split", 0);

  /* "pglast/parser.pyx":418
 *     cdef PgQuerySplitResult splitted
 *     cdef const char *cstring
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     cdef int start
 *     cdef int end
*/
  __pyx_v_i = 0;

  /* "pglast/parser.pyx":421
 *     cdef int start
 *     cdef int end
 *     cdef Displacements offset_to_index = None             # <<<<<<<<<<<<<<
 *     cdef str stmt
 *     cdef Py_ssize_t start_index
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)Py_None);

  /* "pglast/parser.pyx":427
 *     cdef Py_ssize_t end_index
 * 
 *     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(0, 427, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_stmts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":428
 * 
 *     utf8 = stmts.encode('utf-8')
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_2;

  /* "pglast/parser.pyx":430
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         if with_parser:
 *             splitted = pg_query_split_with_parser(cstring)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":431
 * 
 *     with nogil:
 *         if with_parser:             # <<<<<<<<<<<<<<
 *             splitted = pg_query_split_with_parser(cstring)
 *         else:
*/
        if (__pyx_v_with_parser) {

          /* "pglast/parser.pyx":432
 *     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":431
 * 
 *     with nogil:
 *         if with_parser:             # <<<<<<<<<<<<<<
 *             splitted = pg_query_split_with_parser(cstring)
 *         else:
*/
          goto __pyx_L6;
        }

        /* "pglast/parser.pyx":434
 *             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":430
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         if with_parser:
 *             splitted = pg_query_split_with_parser(cstring)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":436
 *             splitted = pg_query_split_with_scanner(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if splitted.error:
 *             message = splitted.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":437
 * 
 *     try:
 *         if splitted.error:             # <<<<<<<<<<<<<<
 *             message = splitted.error.message.decode('utf-8')
 *             offset_to_index = Displacements(stmts)
*/
    __pyx_t_3 = (__pyx_v_splitted.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":438
 *     try:
 *         if splitted.error:
 *             message = splitted.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             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_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 438, __pyx_L8_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __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":439
 *         if splitted.error:
 *             message = splitted.error.message.decode('utf-8')
 *             offset_to_index = Displacements(stmts)             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(splitted.error.cursorpos-1))
 * 
*/
      __pyx_t_6 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_stmts};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L8_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_1);
      }
      __Pyx_DECREF_SET(__pyx_v_offset_to_index, ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":440
 *             message = splitted.error.message.decode('utf-8')
 *             offset_to_index = Displacements(stmts)
 *             raise ParseError(message, offset_to_index(splitted.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         result = []
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 440, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_12 = __Pyx_PyLong_From_long((__pyx_v_splitted.error->cursorpos - 1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 440, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
        __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 440, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_message, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 440, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 440, __pyx_L8_error)

      /* "pglast/parser.pyx":437
 * 
 *     try:
 *         if splitted.error:             # <<<<<<<<<<<<<<
 *             message = splitted.error.message.decode('utf-8')
 *             offset_to_index = Displacements(stmts)
*/
    }

    /* "pglast/parser.pyx":442
 *             raise ParseError(message, offset_to_index(splitted.error.cursorpos-1))
 * 
 *         result = []             # <<<<<<<<<<<<<<
 *         if only_slices:
 *             offset_to_index = Displacements(stmts)
*/
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pglast/parser.pyx":443
 * 
 *         result = []
 *         if only_slices:             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(stmts)
 *         while i < splitted.n_stmts:
*/
    if (__pyx_v_only_slices) {

      /* "pglast/parser.pyx":444
 *         result = []
 *         if only_slices:
 *             offset_to_index = Displacements(stmts)             # <<<<<<<<<<<<<<
 *         while i < splitted.n_stmts:
 *             start = splitted.stmts[i].stmt_location
*/
      __pyx_t_8 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_stmts};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L8_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_1);
      }
      __Pyx_DECREF_SET(__pyx_v_offset_to_index, ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":443
 * 
 *         result = []
 *         if only_slices:             # <<<<<<<<<<<<<<
 *             offset_to_index = Displacements(stmts)
 *         while i < splitted.n_stmts:
*/
    }

    /* "pglast/parser.pyx":445
 *         if only_slices:
 *             offset_to_index = Displacements(stmts)
 *         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":446
 *             offset_to_index = Displacements(stmts)
 *         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')
*/
      __pyx_t_13 = (__pyx_v_splitted.stmts[__pyx_v_i])->stmt_location;
      __pyx_v_start = __pyx_t_13;

      /* "pglast/parser.pyx":447
 *         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')
 *             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":448
 *             start = splitted.stmts[i].stmt_location
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 *             stmt = utf8[start:end].decode('utf-8')             # <<<<<<<<<<<<<<
 *             if only_slices:
 *                 start_index = offset_to_index(start)
*/
      __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_utf8, __pyx_v_start, __pyx_v_end, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_stmt, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":449
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 *             stmt = utf8[start:end].decode('utf-8')
 *             if only_slices:             # <<<<<<<<<<<<<<
 *                 start_index = offset_to_index(start)
 *                 leading_whitespace = len(stmt) - len(stmt.lstrip())
*/
      if (__pyx_v_only_slices) {

        /* "pglast/parser.pyx":450
 *             stmt = utf8[start:end].decode('utf-8')
 *             if only_slices:
 *                 start_index = offset_to_index(start)             # <<<<<<<<<<<<<<
 *                 leading_whitespace = len(stmt) - len(stmt.lstrip())
 *                 end_index = start_index + len(stmt.rstrip())
*/
        __pyx_t_8 = NULL;
        __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
        __pyx_t_9 = ((PyObject *)__pyx_v_offset_to_index); 
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_8);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 450, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_start_index = __pyx_t_5;

        /* "pglast/parser.pyx":451
 *             if only_slices:
 *                 start_index = offset_to_index(start)
 *                 leading_whitespace = len(stmt) - len(stmt.lstrip())             # <<<<<<<<<<<<<<
 *                 end_index = start_index + len(stmt.rstrip())
 *                 result.append(slice(start_index + leading_whitespace, end_index))
*/
        __pyx_t_5 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_stmt); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 451, __pyx_L8_error)
        __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__lstrip, __pyx_v_stmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 451, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_leading_whitespace = (__pyx_t_5 - __pyx_t_14);

        /* "pglast/parser.pyx":452
 *                 start_index = offset_to_index(start)
 *                 leading_whitespace = len(stmt) - len(stmt.lstrip())
 *                 end_index = start_index + len(stmt.rstrip())             # <<<<<<<<<<<<<<
 *                 result.append(slice(start_index + leading_whitespace, end_index))
 *             else:
*/
        __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__rstrip, __pyx_v_stmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 452, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_end_index = (__pyx_v_start_index + __pyx_t_14);

        /* "pglast/parser.pyx":453
 *                 leading_whitespace = len(stmt) - len(stmt.lstrip())
 *                 end_index = start_index + len(stmt.rstrip())
 *                 result.append(slice(start_index + leading_whitespace, end_index))             # <<<<<<<<<<<<<<
 *             else:
 *                 result.append(stmt.strip())
*/
        __pyx_t_1 = PyLong_FromSsize_t((__pyx_v_start_index + __pyx_v_leading_whitespace)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = PyLong_FromSsize_t(__pyx_v_end_index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = PySlice_New(__pyx_t_1, __pyx_t_9, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 453, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pglast/parser.pyx":449
 *             end = splitted.stmts[i].stmt_location + splitted.stmts[i].stmt_len
 *             stmt = utf8[start:end].decode('utf-8')
 *             if only_slices:             # <<<<<<<<<<<<<<
 *                 start_index = offset_to_index(start)
 *                 leading_whitespace = len(stmt) - len(stmt.lstrip())
*/
        goto __pyx_L14;
      }

      /* "pglast/parser.pyx":455
 *                 result.append(slice(start_index + leading_whitespace, end_index))
 *             else:
 *                 result.append(stmt.strip())             # <<<<<<<<<<<<<<
 *             i += 1
 *         return tuple(result)
*/
      /*else*/ {
        __pyx_t_6 = __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__strip, __pyx_v_stmt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 455, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 455, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L14:;

      /* "pglast/parser.pyx":456
 *             else:
 *                 result.append(stmt.strip())
 *             i += 1             # <<<<<<<<<<<<<<
 *         return tuple(result)
 *     finally:
*/
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "pglast/parser.pyx":457
 *                 result.append(stmt.strip())
 *             i += 1
 *         return tuple(result)             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L7_return;
  }

  /* "pglast/parser.pyx":459
 *         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_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_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_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
      if ( 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_13 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":460
 *     finally:
 *         with nogil:
 *             pg_query_free_split_result(splitted)             # <<<<<<<<<<<<<<
 * 
 * 
*/
              pg_query_free_split_result(__pyx_v_splitted);
            }

            /* "pglast/parser.pyx":459
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_split_result(splitted)
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L19;
              }
              __pyx_L19:;
            }
        }
      }
      __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_13; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
      goto __pyx_L1_error;
    }
    __pyx_L7_return: {
      __pyx_t_23 = __pyx_r;
      __pyx_r = 0;
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":460
 *     finally:
 *         with nogil:
 *             pg_query_free_split_result(splitted)             # <<<<<<<<<<<<<<
 * 
 * 
*/
            pg_query_free_split_result(__pyx_v_splitted);
          }

          /* "pglast/parser.pyx":459
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_split_result(splitted)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L22;
            }
            __pyx_L22:;
          }
      }
      __pyx_r = __pyx_t_23;
      __pyx_t_23 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":404
 * 
 * 
 * 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_6);
  __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.split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_offset_to_index);
  __Pyx_XDECREF(__pyx_v_stmt);
  __Pyx_XDECREF(__pyx_v_utf8);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":470
 * 
 * 
 * def comments(str query):             # <<<<<<<<<<<<<<
 *     "Extract the comments embedded in the ``SQL`` query."
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_15comments(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_14comments, "Extract the comments embedded in the ``SQL`` query.");
static PyMethodDef __pyx_mdef_6pglast_6parser_15comments = {"comments", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_15comments, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_14comments};
static PyObject *__pyx_pw_6pglast_6parser_15comments(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("comments (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_query,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 470, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 470, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "comments", 0) < (0)) __PYX_ERR(0, 470, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("comments", 1, 1, 1, i); __PYX_ERR(0, 470, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 470, __pyx_L3_error)
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("comments", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 470, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pglast.parser.comments", __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(0, 470, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_14comments(__pyx_self, __pyx_v_query);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pglast_6parser_14comments(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_query) {
  PgQueryDeparseCommentsResult __pyx_v_comments;
  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_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  char const *__pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("comments", 0);

  /* "pglast/parser.pyx":475
 *     cdef PgQueryDeparseCommentsResult comments
 *     cdef const char *cstring
 *     cdef size_t i = 0             # <<<<<<<<<<<<<<
 * 
 *     utf8 = query.encode('utf-8')
*/
  __pyx_v_i = 0;

  /* "pglast/parser.pyx":477
 *     cdef size_t i = 0
 * 
 *     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(0, 477, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":478
 * 
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_query};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":479
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 479, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_4;

  /* "pglast/parser.pyx":481
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         comments = pg_query_deparse_comments_for_query(cstring)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":482
 * 
 *     with nogil:
 *         comments = pg_query_deparse_comments_for_query(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_comments = pg_query_deparse_comments_for_query(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":481
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         comments = pg_query_deparse_comments_for_query(cstring)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":484
 *         comments = pg_query_deparse_comments_for_query(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if comments.error:
 *             message = comments.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":485
 * 
 *     try:
 *         if comments.error:             # <<<<<<<<<<<<<<
 *             message = comments.error.message.decode('utf-8')
 *             raise ParseError(message, offset_to_index(comments.error.cursorpos-1))
*/
    __pyx_t_5 = (__pyx_v_comments.error != 0);
    if (unlikely(__pyx_t_5)) {

      /* "pglast/parser.pyx":486
 *     try:
 *         if comments.error:
 *             message = comments.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(comments.error.cursorpos-1))
 * 
*/
      __pyx_t_6 = __pyx_v_comments.error->message;
      __pyx_t_7 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L7_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __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":487
 *         if comments.error:
 *             message = comments.error.message.decode('utf-8')
 *             raise ParseError(message, offset_to_index(comments.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         result = []
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 487, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_12 = __Pyx_PyLong_From_long((__pyx_v_comments.error->cursorpos - 1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 487, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
        __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 487, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_message, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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(0, 487, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 487, __pyx_L7_error)

      /* "pglast/parser.pyx":485
 * 
 *     try:
 *         if comments.error:             # <<<<<<<<<<<<<<
 *             message = comments.error.message.decode('utf-8')
 *             raise ParseError(message, offset_to_index(comments.error.cursorpos-1))
*/
    }

    /* "pglast/parser.pyx":489
 *             raise ParseError(message, offset_to_index(comments.error.cursorpos-1))
 * 
 *         result = []             # <<<<<<<<<<<<<<
 *         while i < comments.comment_count:
 *             result.append(Comment(
*/
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pglast/parser.pyx":490
 * 
 *         result = []
 *         while i < comments.comment_count:             # <<<<<<<<<<<<<<
 *             result.append(Comment(
 *                 offset_to_index(comments.comments[i].match_location),
*/
    while (1) {
      __pyx_t_5 = (__pyx_v_i < __pyx_v_comments.comment_count);
      if (!__pyx_t_5) break;

      /* "pglast/parser.pyx":491
 *         result = []
 *         while i < comments.comment_count:
 *             result.append(Comment(             # <<<<<<<<<<<<<<
 *                 offset_to_index(comments.comments[i].match_location),
 *                 comments.comments[i].newlines_before_comment,
*/
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Comment); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 491, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "pglast/parser.pyx":492
 *         while i < comments.comment_count:
 *             result.append(Comment(
 *                 offset_to_index(comments.comments[i].match_location),             # <<<<<<<<<<<<<<
 *                 comments.comments[i].newlines_before_comment,
 *                 comments.comments[i].newlines_after_comment,
*/
      __pyx_t_11 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_12 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_10 = __Pyx_PyLong_From_int((__pyx_v_comments.comments[__pyx_v_i])->match_location); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 492, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_11);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_2);
      }

      /* "pglast/parser.pyx":493
 *             result.append(Comment(
 *                 offset_to_index(comments.comments[i].match_location),
 *                 comments.comments[i].newlines_before_comment,             # <<<<<<<<<<<<<<
 *                 comments.comments[i].newlines_after_comment,
 *                 comments.comments[i].str.decode('utf-8'),
*/
      __pyx_t_12 = __Pyx_PyLong_From_int((__pyx_v_comments.comments[__pyx_v_i])->newlines_before_comment); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 493, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_12);

      /* "pglast/parser.pyx":494
 *                 offset_to_index(comments.comments[i].match_location),
 *                 comments.comments[i].newlines_before_comment,
 *                 comments.comments[i].newlines_after_comment,             # <<<<<<<<<<<<<<
 *                 comments.comments[i].str.decode('utf-8'),
 *             ))
*/
      __pyx_t_10 = __Pyx_PyLong_From_int((__pyx_v_comments.comments[__pyx_v_i])->newlines_after_comment); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 494, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_10);

      /* "pglast/parser.pyx":495
 *                 comments.comments[i].newlines_before_comment,
 *                 comments.comments[i].newlines_after_comment,
 *                 comments.comments[i].str.decode('utf-8'),             # <<<<<<<<<<<<<<
 *             ))
 *             i += 1
*/
      __pyx_t_6 = (__pyx_v_comments.comments[__pyx_v_i])->str;
      __pyx_t_7 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 495, __pyx_L7_error)
      __pyx_t_11 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 495, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_2, __pyx_t_12, __pyx_t_10, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_3, (5-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }

      /* "pglast/parser.pyx":491
 *         result = []
 *         while i < comments.comment_count:
 *             result.append(Comment(             # <<<<<<<<<<<<<<
 *                 offset_to_index(comments.comments[i].match_location),
 *                 comments.comments[i].newlines_before_comment,
*/
      __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 491, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pglast/parser.pyx":497
 *                 comments.comments[i].str.decode('utf-8'),
 *             ))
 *             i += 1             # <<<<<<<<<<<<<<
 *         return tuple(result)
 *     finally:
*/
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "pglast/parser.pyx":498
 *             ))
 *             i += 1
 *         return tuple(result)             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":500
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_comments_result(comments);
 * 
*/
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 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_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_17);
      __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_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":501
 *     finally:
 *         with nogil:
 *             pg_query_free_deparse_comments_result(comments);             # <<<<<<<<<<<<<<
 * 
 * 
*/
              pg_query_free_deparse_comments_result(__pyx_v_comments);
            }

            /* "pglast/parser.pyx":500
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_comments_result(comments);
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L16;
              }
              __pyx_L16:;
            }
        }
      }
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_22 = __pyx_r;
      __pyx_r = 0;
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":501
 *     finally:
 *         with nogil:
 *             pg_query_free_deparse_comments_result(comments);             # <<<<<<<<<<<<<<
 * 
 * 
*/
            pg_query_free_deparse_comments_result(__pyx_v_comments);
          }

          /* "pglast/parser.pyx":500
 *         return tuple(result)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_comments_result(comments);
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L19;
            }
            __pyx_L19:;
          }
      }
      __pyx_r = __pyx_t_22;
      __pyx_t_22 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":470
 * 
 * 
 * def comments(str query):             # <<<<<<<<<<<<<<
 *     "Extract the comments embedded in the ``SQL`` query."
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __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.comments", __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_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pglast/parser.pyx":504
 * 
 * 
 * def deparse_protobuf(bytes protobuf,             # <<<<<<<<<<<<<<
 *                      bint pretty_print=False,
 *                      int indent_size=4,
*/

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_17deparse_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_16deparse_protobuf, "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement.");
static PyMethodDef __pyx_mdef_6pglast_6parser_17deparse_protobuf = {"deparse_protobuf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_17deparse_protobuf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_16deparse_protobuf};
static PyObject *__pyx_pw_6pglast_6parser_17deparse_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;
  int __pyx_v_pretty_print;
  int __pyx_v_indent_size;
  int __pyx_v_max_line_length;
  int __pyx_v_trailing_newline;
  int __pyx_v_commas_start_of_line;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_protobuf,&__pyx_mstate_global->__pyx_n_u_pretty_print,&__pyx_mstate_global->__pyx_n_u_indent_size,&__pyx_mstate_global->__pyx_n_u_max_line_length,&__pyx_mstate_global->__pyx_n_u_trailing_newline,&__pyx_mstate_global->__pyx_n_u_commas_start_of_line,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 504, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "deparse_protobuf", 0) < (0)) __PYX_ERR(0, 504, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("deparse_protobuf", 0, 1, 6, i); __PYX_ERR(0, 504, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 504, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_protobuf = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_pretty_print = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pretty_print == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L3_error)
    } else {

      /* "pglast/parser.pyx":505
 * 
 * def deparse_protobuf(bytes protobuf,
 *                      bint pretty_print=False,             # <<<<<<<<<<<<<<
 *                      int indent_size=4,
 *                      int max_line_length=80,
*/
      __pyx_v_pretty_print = ((int)((int)0));
    }
    if (values[2]) {
      __pyx_v_indent_size = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_indent_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L3_error)
    } else {
      __pyx_v_indent_size = ((int)((int)4));
    }
    if (values[3]) {
      __pyx_v_max_line_length = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_max_line_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 507, __pyx_L3_error)
    } else {
      __pyx_v_max_line_length = ((int)((int)80));
    }
    if (values[4]) {
      __pyx_v_trailing_newline = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_trailing_newline == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L3_error)
    } else {

      /* "pglast/parser.pyx":508
 *                      int indent_size=4,
 *                      int max_line_length=80,
 *                      bint trailing_newline=False,             # <<<<<<<<<<<<<<
 *                      bint commas_start_of_line=False):
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
*/
      __pyx_v_trailing_newline = ((int)((int)0));
    }
    if (values[5]) {
      __pyx_v_commas_start_of_line = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_commas_start_of_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L3_error)
    } else {

      /* "pglast/parser.pyx":509
 *                      int max_line_length=80,
 *                      bint trailing_newline=False,
 *                      bint commas_start_of_line=False):             # <<<<<<<<<<<<<<
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
 * 
*/
      __pyx_v_commas_start_of_line = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("deparse_protobuf", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 504, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 504, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_16deparse_protobuf(__pyx_self, __pyx_v_protobuf, __pyx_v_pretty_print, __pyx_v_indent_size, __pyx_v_max_line_length, __pyx_v_trailing_newline, __pyx_v_commas_start_of_line);

  /* "pglast/parser.pyx":504
 * 
 * 
 * def deparse_protobuf(bytes protobuf,             # <<<<<<<<<<<<<<
 *                      bint pretty_print=False,
 *                      int indent_size=4,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pglast_6parser_16deparse_protobuf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_protobuf, int __pyx_v_pretty_print, int __pyx_v_indent_size, int __pyx_v_max_line_length, int __pyx_v_trailing_newline, int __pyx_v_commas_start_of_line) {
  PgQueryProtobuf __pyx_v_tree;
  PgQueryDeparseResult __pyx_v_deparsed;
  PostgresDeparseOpts __pyx_v_opts;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PostgresDeparseOpts __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  char *__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 = NULL;
  size_t __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("deparse_protobuf", 0);

  /* "pglast/parser.pyx":515
 *     cdef PgQueryDeparseResult deparsed
 *     cdef size_t i
 *     cdef PostgresDeparseOpts opts = PostgresDeparseOpts(comments=<PostgresDeparseComment**> 0,             # <<<<<<<<<<<<<<
 *                                                         comment_count=0,
 *                                                         pretty_print=pretty_print,
*/
  __pyx_t_1.comments = ((PostgresDeparseComment **)0);
  __pyx_t_1.comment_count = 0;

  /* "pglast/parser.pyx":517
 *     cdef PostgresDeparseOpts opts = PostgresDeparseOpts(comments=<PostgresDeparseComment**> 0,
 *                                                         comment_count=0,
 *                                                         pretty_print=pretty_print,             # <<<<<<<<<<<<<<
 *                                                         indent_size=indent_size,
 *                                                         max_line_length=max_line_length,
*/
  __pyx_t_1.pretty_print = __pyx_v_pretty_print;

  /* "pglast/parser.pyx":518
 *                                                         comment_count=0,
 *                                                         pretty_print=pretty_print,
 *                                                         indent_size=indent_size,             # <<<<<<<<<<<<<<
 *                                                         max_line_length=max_line_length,
 *                                                         trailing_newline=trailing_newline,
*/
  __pyx_t_1.indent_size = __pyx_v_indent_size;

  /* "pglast/parser.pyx":519
 *                                                         pretty_print=pretty_print,
 *                                                         indent_size=indent_size,
 *                                                         max_line_length=max_line_length,             # <<<<<<<<<<<<<<
 *                                                         trailing_newline=trailing_newline,
 *                                                         commas_start_of_line=commas_start_of_line)
*/
  __pyx_t_1.max_line_length = __pyx_v_max_line_length;

  /* "pglast/parser.pyx":520
 *                                                         indent_size=indent_size,
 *                                                         max_line_length=max_line_length,
 *                                                         trailing_newline=trailing_newline,             # <<<<<<<<<<<<<<
 *                                                         commas_start_of_line=commas_start_of_line)
 * 
*/
  __pyx_t_1.trailing_newline = __pyx_v_trailing_newline;

  /* "pglast/parser.pyx":521
 *                                                         max_line_length=max_line_length,
 *                                                         trailing_newline=trailing_newline,
 *                                                         commas_start_of_line=commas_start_of_line)             # <<<<<<<<<<<<<<
 * 
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)
*/
  __pyx_t_1.commas_start_of_line = __pyx_v_commas_start_of_line;
  __pyx_v_opts = __pyx_t_1;

  /* "pglast/parser.pyx":523
 *                                                         commas_start_of_line=commas_start_of_line)
 * 
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)             # <<<<<<<<<<<<<<
 *     with nogil:
 *         deparsed = pg_query_deparse_protobuf_opts(tree, opts)
*/
  __pyx_t_2 = PyBytes_AsStringAndSize(__pyx_v_protobuf, (&__pyx_v_tree.data), ((Py_ssize_t *)(&__pyx_v_tree.len))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 523, __pyx_L1_error)

  /* "pglast/parser.pyx":524
 * 
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         deparsed = pg_query_deparse_protobuf_opts(tree, opts)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":525
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)
 *     with nogil:
 *         deparsed = pg_query_deparse_protobuf_opts(tree, opts)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_deparsed = pg_query_deparse_protobuf_opts(__pyx_v_tree, __pyx_v_opts);
      }

      /* "pglast/parser.pyx":524
 * 
 *     PyBytes_AsStringAndSize(protobuf, &tree.data, <Py_ssize_t *>&tree.len)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         deparsed = pg_query_deparse_protobuf_opts(tree, opts)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":527
 *         deparsed = pg_query_deparse_protobuf_opts(tree, opts)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if deparsed.error:
 *             message = deparsed.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":528
 * 
 *     try:
 *         if deparsed.error:             # <<<<<<<<<<<<<<
 *             message = deparsed.error.message.decode('utf-8')
 *             raise DeparseError(message, deparsed.error.cursorpos)
*/
    __pyx_t_3 = (__pyx_v_deparsed.error != 0);
    if (unlikely(__pyx_t_3)) {

      /* "pglast/parser.pyx":529
 *     try:
 *         if deparsed.error:
 *             message = deparsed.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             raise DeparseError(message, deparsed.error.cursorpos)
 * 
*/
      __pyx_t_4 = __pyx_v_deparsed.error->message;
      __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 529, __pyx_L7_error)
      __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_message = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pglast/parser.pyx":530
 *         if deparsed.error:
 *             message = deparsed.error.message.decode('utf-8')
 *             raise DeparseError(message, deparsed.error.cursorpos)             # <<<<<<<<<<<<<<
 * 
 *         return deparsed.query.decode('utf-8')
*/
      __pyx_t_7 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_DeparseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 530, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_deparsed.error->cursorpos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 530, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_10 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_message, __pyx_t_9};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__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_6)) __PYX_ERR(0, 530, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 530, __pyx_L7_error)

      /* "pglast/parser.pyx":528
 * 
 *     try:
 *         if deparsed.error:             # <<<<<<<<<<<<<<
 *             message = deparsed.error.message.decode('utf-8')
 *             raise DeparseError(message, deparsed.error.cursorpos)
*/
    }

    /* "pglast/parser.pyx":532
 *             raise DeparseError(message, deparsed.error.cursorpos)
 * 
 *         return deparsed.query.decode('utf-8')             # <<<<<<<<<<<<<<
 *     finally:
 *         with nogil:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_deparsed.query;
    __pyx_t_5 = __Pyx_ssize_strlen(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 532, __pyx_L7_error)
    __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_4, 0, __pyx_t_5, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L6_return;
  }

  /* "pglast/parser.pyx":534
 *         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_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_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;
       __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      if ( 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_2 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":535
 *     finally:
 *         with nogil:
 *             pg_query_free_deparse_result(deparsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
              pg_query_free_deparse_result(__pyx_v_deparsed);
            }

            /* "pglast/parser.pyx":534
 *         return deparsed.query.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_result(deparsed)
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L14;
              }
              __pyx_L14:;
            }
        }
      }
      __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_2; __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;
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":535
 *     finally:
 *         with nogil:
 *             pg_query_free_deparse_result(deparsed)             # <<<<<<<<<<<<<<
 * 
 * 
*/
            pg_query_free_deparse_result(__pyx_v_deparsed);
          }

          /* "pglast/parser.pyx":534
 *         return deparsed.query.decode('utf-8')
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_deparse_result(deparsed)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L17;
            }
            __pyx_L17:;
          }
      }
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "pglast/parser.pyx":504
 * 
 * 
 * def deparse_protobuf(bytes protobuf,             # <<<<<<<<<<<<<<
 *                      bint pretty_print=False,
 *                      int indent_size=4,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":541
 * 
 * 
 * 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_19scan(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_18scan, "Lexify the given ``SQL`` `query` and return a list of its lexical tokens.");
static PyMethodDef __pyx_mdef_6pglast_6parser_19scan = {"scan", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_19scan, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6pglast_6parser_18scan};
static PyObject *__pyx_pw_6pglast_6parser_19scan(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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_query,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 541, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scan", 0) < (0)) __PYX_ERR(0, 541, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan", 1, 1, 1, i); __PYX_ERR(0, 541, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error)
    }
    __pyx_v_query = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("scan", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 541, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __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(0, 541, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_18scan(__pyx_self, __pyx_v_query);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pglast_6parser_18scan(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;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  char const *__pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  size_t __pyx_t_13;
  size_t __pyx_t_14;
  size_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  char const *__pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  char const *__pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scan", 0);

  /* "pglast/parser.pyx":552
 *     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(0, 552, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_utf8 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":553
 * 
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)             # <<<<<<<<<<<<<<
 *     cstring = utf8
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_query};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_offset_to_index = ((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pglast/parser.pyx":554
 *     utf8 = query.encode('utf-8')
 *     offset_to_index = Displacements(query)
 *     cstring = utf8             # <<<<<<<<<<<<<<
 * 
 *     with nogil:
*/
  __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_utf8); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 554, __pyx_L1_error)
  __pyx_v_cstring = __pyx_t_4;

  /* "pglast/parser.pyx":556
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         scanned = pg_query_scan(cstring)
 * 
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "pglast/parser.pyx":557
 * 
 *     with nogil:
 *         scanned = pg_query_scan(cstring)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
        __pyx_v_scanned = pg_query_scan(__pyx_v_cstring);
      }

      /* "pglast/parser.pyx":556
 *     cstring = utf8
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         scanned = pg_query_scan(cstring)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "pglast/parser.pyx":559
 *         scanned = pg_query_scan(cstring)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if scanned.error:
 *             message = scanned.error.message.decode('utf-8')
*/
  /*try:*/ {

    /* "pglast/parser.pyx":560
 * 
 *     try:
 *         if scanned.error:             # <<<<<<<<<<<<<<
 *             message = scanned.error.message.decode('utf-8')
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
*/
    __pyx_t_5 = (__pyx_v_scanned.error != 0);
    if (unlikely(__pyx_t_5)) {

      /* "pglast/parser.pyx":561
 *     try:
 *         if scanned.error:
 *             message = scanned.error.message.decode('utf-8')             # <<<<<<<<<<<<<<
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
 * 
*/
      __pyx_t_6 = __pyx_v_scanned.error->message;
      __pyx_t_7 = __Pyx_ssize_strlen(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 561, __pyx_L7_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_6, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __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":562
 *         if scanned.error:
 *             message = scanned.error.message.decode('utf-8')
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ParseError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 562, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_12 = __Pyx_PyLong_From_long((__pyx_v_scanned.error->cursorpos - 1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 562, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
        __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 562, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_message, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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(0, 562, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 562, __pyx_L7_error)

      /* "pglast/parser.pyx":560
 * 
 *     try:
 *         if scanned.error:             # <<<<<<<<<<<<<<
 *             message = scanned.error.message.decode('utf-8')
 *             raise ParseError(message, offset_to_index(scanned.error.cursorpos-1))
*/
    }

    /* "pglast/parser.pyx":564
 *             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)
*/
    {
        PyThreadState * _save;
        _save = PyEval_SaveThread();
        __Pyx_FastGIL_Remember();
        /*try:*/ {

          /* "pglast/parser.pyx":565
 * 
 *         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":564
 *             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:*/{
            __Pyx_FastGIL_Forget();
            PyEval_RestoreThread(_save);
            goto __pyx_L12;
          }
          __pyx_L12:;
        }
    }

    /* "pglast/parser.pyx":568
 *                                                         <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(0, 568, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pglast/parser.pyx":570
 *         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_3 = __pyx_v_scan_result->n_tokens;
    __pyx_t_13 = __pyx_t_3;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
      __pyx_v_i = __pyx_t_14;

      /* "pglast/parser.pyx":571
 * 
 *         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":572
 *         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":574
 *             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":577
 *                                                           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_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Token); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 577, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_12 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_10 = __Pyx_PyLong_From_int32_t(__pyx_v_scan_token->start); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 577, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_15 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_11);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_15 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_offset_to_index);
      __pyx_t_11 = ((PyObject *)__pyx_v_offset_to_index); 
      __pyx_t_16 = __Pyx_PyLong_From_long((__pyx_v_scan_token->end - 1)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 577, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_15 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_15 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_16};
        __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 577, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_12);
      }

      /* "pglast/parser.pyx":578
 * 
 *             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)
*/
      __pyx_t_5 = (__pyx_v_tkind != NULL);
      if (__pyx_t_5) {
        __pyx_t_17 = __pyx_v_tkind->name;
        __pyx_t_7 = __Pyx_ssize_strlen(__pyx_t_17); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 578, __pyx_L7_error)
        __pyx_t_16 = __Pyx_decode_c_string(__pyx_t_17, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 578, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_16);
        __pyx_t_11 = __pyx_t_16;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else {
        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_UNKNOWN);
        __pyx_t_11 = __pyx_mstate_global->__pyx_n_u_UNKNOWN;
      }

      /* "pglast/parser.pyx":579
 *             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_17 = __pyx_v_kwkind->name;
      __pyx_t_7 = __Pyx_ssize_strlen(__pyx_t_17); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 579, __pyx_L7_error)
      __pyx_t_16 = __Pyx_decode_c_string(__pyx_t_17, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 579, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_15 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_15 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_2, __pyx_t_12, __pyx_t_11, __pyx_t_16};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_15, (5-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "pglast/parser.pyx":580
 *                           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":581
 *                           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":583
 *             PyList_SET_ITEM(result, i, token)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
*/
    {
        PyThreadState * _save;
        _save = PyEval_SaveThread();
        __Pyx_FastGIL_Remember();
        /*try:*/ {

          /* "pglast/parser.pyx":584
 * 
 *         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":583
 *             PyList_SET_ITEM(result, i, token)
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_FastGIL_Forget();
            PyEval_RestoreThread(_save);
            goto __pyx_L17;
          }
          __pyx_L17:;
        }
    }
  }

  /* "pglast/parser.pyx":586
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_scan_result(scanned)
 * 
*/
  /*finally:*/ {
    /*normal exit:*/{
      {
          PyThreadState * _save;
          _save = PyEval_SaveThread();
          __Pyx_FastGIL_Remember();
          /*try:*/ {

            /* "pglast/parser.pyx":587
 *     finally:
 *         with nogil:
 *             pg_query_free_scan_result(scanned)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
            pg_query_free_scan_result(__pyx_v_scanned);
          }

          /* "pglast/parser.pyx":586
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_scan_result(scanned)
 * 
*/
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_FastGIL_Forget();
              PyEval_RestoreThread(_save);
              goto __pyx_L20;
            }
            __pyx_L20:;
          }
      }
      goto __pyx_L8;
    }
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
      __Pyx_XDECREF(__pyx_t_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_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
      if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_24);
      __Pyx_XGOTREF(__pyx_t_25);
      __Pyx_XGOTREF(__pyx_t_26);
      __pyx_t_18 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
      {
        {
            PyThreadState * _save;
            _save = PyEval_SaveThread();
            __Pyx_FastGIL_Remember();
            /*try:*/ {

              /* "pglast/parser.pyx":587
 *     finally:
 *         with nogil:
 *             pg_query_free_scan_result(scanned)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
              pg_query_free_scan_result(__pyx_v_scanned);
            }

            /* "pglast/parser.pyx":586
 *             pg_query__scan_result__free_unpacked(scan_result, NULL)
 *     finally:
 *         with nogil:             # <<<<<<<<<<<<<<
 *             pg_query_free_scan_result(scanned)
 * 
*/
            /*finally:*/ {
              /*normal exit:*/{
                __Pyx_FastGIL_Forget();
                PyEval_RestoreThread(_save);
                goto __pyx_L25;
              }
              __pyx_L25:;
            }
        }
      }
      __Pyx_XGIVEREF(__pyx_t_24);
      __Pyx_XGIVEREF(__pyx_t_25);
      __Pyx_XGIVEREF(__pyx_t_26);
      __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23);
      __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
      __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
      goto __pyx_L1_error;
    }
    __pyx_L8:;
  }

  /* "pglast/parser.pyx":589
 *             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":541
 * 
 * 
 * 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_2);
  __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_XDECREF(__pyx_t_16);
  __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)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, b'displacements, max_offset')
*/

/* Python wrapper */
static PyObject *__pyx_pw_6pglast_6parser_21__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_21__pyx_unpickle_Displacements = {"__pyx_unpickle_Displacements", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_21__pyx_unpickle_Displacements, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6pglast_6parser_21__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 Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  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_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(2, 4, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Displacements", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Displacements", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error)
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error)
    __pyx_v___pyx_state = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Displacements", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("pglast.parser.__pyx_unpickle_Displacements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error)
  __pyx_r = __pyx_pf_6pglast_6parser_20__pyx_unpickle_Displacements(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pglast_6parser_20__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_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  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)":6
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, b'displacements, max_offset')             # <<<<<<<<<<<<<<
 *     __pyx_result = Displacements.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
  __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, __pyx_k_displacements_max_offset); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error)

  /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, b'displacements, max_offset')
 *     __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 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, b'displacements, max_offset')
 *     __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_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
  if (__pyx_t_5) {

    /* "(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, __pyx_state: tuple):
*/
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
      __PYX_ERR(2, 9, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_6pglast_6parser___pyx_unpickle_Displacements__set_state(((struct __pyx_obj_6pglast_6parser_Displacements *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, b'displacements, max_offset')
 *     __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, __pyx_state: tuple):
 *     __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)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, b'displacements, max_offset')
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pglast.parser.__pyx_unpickle_Displacements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __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, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2)
*/

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;
  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, __pyx_state: tuple):
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2)
*/
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); 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;
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_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, __pyx_state: tuple):
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2)             # <<<<<<<<<<<<<<
*/
  __pyx_t_3 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)

  /* "(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, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.displacements = __pyx_state[0]; __pyx_result.max_offset = __pyx_state[1]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 2)
*/

  /* 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.__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;
}
/* #### Code section: module_exttypes ### */

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;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  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(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(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);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

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;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  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(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6pglast_6parser_13Displacements_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(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*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  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_mstate->__pyx_ptype_6pglast_6parser_Displacements = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6pglast_6parser_Displacements_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements)) __PYX_ERR(0, 201, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6pglast_6parser_Displacements_spec, __pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements) < (0)) __PYX_ERR(0, 201, __pyx_L1_error)
  #else
  __pyx_mstate->__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_mstate->__pyx_ptype_6pglast_6parser_Displacements) < (0)) __PYX_ERR(0, 201, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements->tp_dictoffset && __pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Displacements, (PyObject *) __pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements) < (0)) __PYX_ERR(0, 201, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_6pglast_6parser_Displacements) < (0)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  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_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_8(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_8(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_8(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_8); if (!__pyx_mstate->__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(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#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},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {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_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -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

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__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);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
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)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        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 !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    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;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    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
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = 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;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "parser" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #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("PyInit_parser", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_pglast__parser) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "pglast.parser")) {
      if (unlikely((PyDict_SetItemString(modules, "pglast.parser", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  /* "pglast/parser.pyx":12
 * 
 * from . cimport structs
 * from . import Error             # <<<<<<<<<<<<<<
 * 
 * from cpython.bytes cimport PyBytes_AsStringAndSize, PyBytes_FromStringAndSize
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Error};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_pglast, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Error};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":19
 * from libc.stdint cimport int32_t, uint64_t, uint8_t
 * 
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * 
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/ast.pyx":13
 * from cpython.tuple cimport PyTuple_New, PyTuple_SET_ITEM
 * 
 * from pglast import ast, enums             # <<<<<<<<<<<<<<
 * from pglast cimport structs
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ast,__pyx_mstate_global->__pyx_n_u_enums};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pglast_2, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ast,__pyx_mstate_global->__pyx_n_u_enums};
    for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(1, 13, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_mstate_global->__pyx_n_u_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_ParseError, __pyx_mstate_global->__pyx_n_u_ParseError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_kp_u_Exception_representing_the_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_2 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 25, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_10ParseError_1__str__, 0, __pyx_mstate_global->__pyx_n_u_ParseError___str, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_4) < (0)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pglast/parser.pyx":25
 * 
 * 
 * class ParseError(Error):             # <<<<<<<<<<<<<<
 *     "Exception representing the error state returned by the PG parser."
 * 
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ParseError, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ParseError, __pyx_t_4) < (0)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_mstate_global->__pyx_n_u_Error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_DeparseError, __pyx_mstate_global->__pyx_n_u_DeparseError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_kp_u_Exception_representing_the_error_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_2 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 37, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_5 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_12DeparseError_1__str__, 0, __pyx_mstate_global->__pyx_n_u_DeparseError___str, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_5) < (0)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pglast/parser.pyx":37
 * 
 * 
 * class DeparseError(Error):             # <<<<<<<<<<<<<<
 *     "Exception representing the error state returned by the PG deparser."
 * 
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DeparseError, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DeparseError, __pyx_t_5) < (0)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":198
 * 
 * 
 * LONG_MAX = limits.LONG_MAX             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_From_long(LONG_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LONG_MAX, __pyx_t_2) < (0)) __PYX_ERR(0, 198, __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_mstate_global->__pyx_n_u_Displacements___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_13Displacements_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Displacements___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6pglast_6parser_Displacements, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":265
 * 
 * 
 * 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_mstate_global->__pyx_n_u_get_postgresql_version, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_postgresql_version, __pyx_t_2) < (0)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":273
 * 
 * 
 * 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_mstate_global->__pyx_n_u_parse_sql, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_sql, __pyx_t_2) < (0)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":307
 * 
 * 
 * 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_mstate_global->__pyx_n_u_parse_sql_json, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_sql_json, __pyx_t_2) < (0)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":331
 * 
 * 
 * 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_mstate_global->__pyx_n_u_parse_sql_protobuf, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_sql_protobuf, __pyx_t_2) < (0)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":356
 * 
 * 
 * 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_mstate_global->__pyx_n_u_parse_plpgsql_json, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_plpgsql_json, __pyx_t_2) < (0)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":380
 * 
 * 
 * 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_mstate_global->__pyx_n_u_fingerprint, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_fingerprint, __pyx_t_2) < (0)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pglast/parser.pyx":404
 * 
 * 
 * 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(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_Pack(2, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_13split, 0, __pyx_mstate_global->__pyx_n_u_split, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_split, __pyx_t_6) < (0)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "pglast/parser.pyx":463
 * 
 * 
 * Comment = namedtuple('Comment',             # <<<<<<<<<<<<<<
 *                      ('match_location',
 *                       'newlines_before_comment',
*/
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "pglast/parser.pyx":464
 * 
 * Comment = namedtuple('Comment',
 *                      ('match_location',             # <<<<<<<<<<<<<<
 *                       'newlines_before_comment',
 *                       'newlines_after_comment',
*/
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Comment, __pyx_t_4) < (0)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pglast/parser.pyx":470
 * 
 * 
 * def comments(str query):             # <<<<<<<<<<<<<<
 *     "Extract the comments embedded in the ``SQL`` query."
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_15comments, 0, __pyx_mstate_global->__pyx_n_u_comments, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_comments, __pyx_t_4) < (0)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pglast/parser.pyx":505
 * 
 * def deparse_protobuf(bytes protobuf,
 *                      bint pretty_print=False,             # <<<<<<<<<<<<<<
 *                      int indent_size=4,
 *                      int max_line_length=80,
*/
  __pyx_t_4 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "pglast/parser.pyx":506
 * def deparse_protobuf(bytes protobuf,
 *                      bint pretty_print=False,
 *                      int indent_size=4,             # <<<<<<<<<<<<<<
 *                      int max_line_length=80,
 *                      bint trailing_newline=False,
*/
  __pyx_t_6 = __Pyx_PyLong_From_int(((int)4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "pglast/parser.pyx":507
 *                      bint pretty_print=False,
 *                      int indent_size=4,
 *                      int max_line_length=80,             # <<<<<<<<<<<<<<
 *                      bint trailing_newline=False,
 *                      bint commas_start_of_line=False):
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(((int)80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "pglast/parser.pyx":508
 *                      int indent_size=4,
 *                      int max_line_length=80,
 *                      bint trailing_newline=False,             # <<<<<<<<<<<<<<
 *                      bint commas_start_of_line=False):
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
*/
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "pglast/parser.pyx":509
 *                      int max_line_length=80,
 *                      bint trailing_newline=False,
 *                      bint commas_start_of_line=False):             # <<<<<<<<<<<<<<
 *     "Convert the ``protobuf`` serialized parse tree into an equivalent ``SQL`` statement."
 * 
*/
  __pyx_t_7 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "pglast/parser.pyx":504
 * 
 * 
 * def deparse_protobuf(bytes protobuf,             # <<<<<<<<<<<<<<
 *                      bint pretty_print=False,
 *                      int indent_size=4,
*/
  __pyx_t_8 = PyTuple_Pack(5, __pyx_t_4, __pyx_t_6, __pyx_t_2, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_17deparse_protobuf, 0, __pyx_mstate_global->__pyx_n_u_deparse_protobuf, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_deparse_protobuf, __pyx_t_7) < (0)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pglast/parser.pyx":538
 * 
 * 
 * Token = namedtuple('Token', ('start', 'end', 'name', 'kind'))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_namedtuple); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[3], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Token, __pyx_t_8) < (0)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pglast/parser.pyx":541
 * 
 * 
 * def scan(str query):             # <<<<<<<<<<<<<<
 *     "Lexify the given ``SQL`` `query` and return a list of its lexical tokens."
 * 
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_19scan, 0, __pyx_mstate_global->__pyx_n_u_scan, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_scan, __pyx_t_8) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Displacements(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x236a782, 0x2e307f9, 0x7645d40, b'displacements, max_offset')
*/
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6pglast_6parser_21__pyx_unpickle_Displacements, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Displacements, NULL, __pyx_mstate_global->__pyx_n_u_pglast_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Displacements, __pyx_t_8) < (0)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_8) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init pglast.parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #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;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 249, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__lstrip.type = (PyObject*)(&PyUnicode_Type);
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__lstrip.method_name = &__pyx_mstate->__pyx_n_u_lstrip;
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__rstrip.type = (PyObject*)(&PyUnicode_Type);
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__rstrip.method_name = &__pyx_mstate->__pyx_n_u_rstrip;
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__strip.type = (PyObject*)(&PyUnicode_Type);
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__strip.method_name = &__pyx_mstate->__pyx_n_u_strip;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "pglast/parser.pyx":464
 * 
 * Comment = namedtuple('Comment',
 *                      ('match_location',             # <<<<<<<<<<<<<<
 *                       'newlines_before_comment',
 *                       'newlines_after_comment',
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_n_u_match_location, __pyx_mstate_global->__pyx_n_u_newlines_before_comment, __pyx_mstate_global->__pyx_n_u_newlines_after_comment, __pyx_mstate_global->__pyx_n_u_str_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "pglast/parser.pyx":463
 * 
 * 
 * Comment = namedtuple('Comment',             # <<<<<<<<<<<<<<
 *                      ('match_location',
 *                       'newlines_before_comment',
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_Comment, __pyx_mstate_global->__pyx_tuple[0]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "pglast/parser.pyx":538
 * 
 * 
 * Token = namedtuple('Token', ('start', 'end', 'name', 'kind'))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_n_u_start, __pyx_mstate_global->__pyx_n_u_end, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_Token, __pyx_mstate_global->__pyx_tuple[2]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<4; ++i) {
      #if PY_VERSION_HEX >= 0x030F0000
      PyUnstable_SetImmortal(table[i]);
      #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
      }
      #else
      if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 9; } index[] = {{65},{67},{179},{17},{1},{1},{8},{11},{14},{7},{6},{2},{9},{7},{17},{14},{0},{17},{11},{7},{6},{11},{9},{13},{6},{10},{8},{6},{5},{18},{28},{20},{17},{26},{15},{13},{18},{26},{18},{12},{22},{17},{22},{21},{17},{17},{14},{15},{22},{20},{16},{13},{12},{14},{21},{21},{15},{17},{24},{21},{13},{21},{26},{14},{14},{13},{20},{18},{15},{9},{9},{8},{12},{12},{7},{11},{14},{14},{15},{11},{8},{8},{12},{8},{14},{15},{11},{7},{12},{14},{19},{11},{15},{12},{13},{11},{9},{9},{7},{11},{15},{11},{17},{10},{10},{18},{18},{8},{12},{14},{20},{16},{14},{19},{19},{13},{23},{22},{18},{17},{17},{18},{15},{16},{21},{15},{14},{16},{13},{15},{10},{22},{17},{20},{19},{14},{21},{12},{13},{14},{17},{7},{13},{10},{10},{12},{20},{11},{11},{13},{31},{33},{6},{12},{13},{12},{8},{20},{18},{19},{10},{5},{11},{11},{14},{9},{11},{10},{5},{8},{8},{8},{17},{21},{13},{9},{15},{12},{11},{15},{23},{23},{9},{9},{11},{13},{15},{10},{7},{10},{8},{8},{18},{12},{12},{20},{25},{12},{16},{19},{19},{12},{8},{10},{10},{14},{12},{15},{12},{13},{21},{10},{13},{10},{13},{14},{17},{9},{15},{19},{17},{13},{13},{11},{8},{11},{10},{8},{18},{8},{14},{13},{11},{14},{9},{16},{15},{10},{8},{14},{12},{10},{8},{12},{10},{14},{14},{16},{16},{14},{6},{14},{12},{5},{9},{8},{10},{18},{18},{12},{13},{19},{23},{13},{17},{11},{18},{22},{16},{20},{5},{11},{7},{17},{13},{14},{14},{17},{16},{13},{16},{11},{8},{7},{17},{18},{17},{11},{11},{10},{19},{9},{10},{15},{13},{15},{19},{8},{12},{12},{14},{7},{13},{8},{16},{18},{17},{12},{10},{12},{16},{12},{6},{9},{11},{15},{9},{6},{7},{11},{7},{15},{9},{13},{15},{17},{11},{5},{15},{19},{17},{12},{8},{8},{7},{12},{10},{14},{10},{3},{16},{15},{15},{16},{15},{8},{7},{12},{9},{10},{22},{15},{10},{7},{9},{13},{12},{12},{4},{3},{18},{18},{11},{20},{13},{8},{7},{9},{16},{8},{8},{5},{7},{3},{9},{5},{11},{8},{22},{12},{1},{11},{13},{4},{5},{4},{6},{18},{8},{6},{8},{5},{14},{15},{4},{7},{13},{5},{10},{15},{8},{4},{10},{7},{22},{23},{6},{15},{11},{4},{18},{9},{14},{18},{6},{6},{13},{3},{11},{12},{8},{14},{12},{11},{10},{28},{12},{5},{10},{17},{13},{6},{8},{6},{1},{4},{11},{10},{7},{4},{12},{10},{12},{19},{5},{8},{5},{11},{5},{4},{5},{7},{3},{5},{8},{5},{5},{16},{4},{4},{6},{12},{4},{6},{7},{11},{11},{130},{114},{113},{112},{195},{291},{161},{317},{200},{63},{62},{102},{29},{56}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (3610 bytes) */
const char* const cstring = "(\265/\375`9\036\205p\000\352\211\310\033G\360\2228\007\314\300\354\004\032-DZ\2615q\305\210\233\006\323\231\242\321B\342So\210H\022i[\344\212@\272?\227\314aD\020@\213\177\300S\3740;:3U\000\020\221\210Ye\026\000@j\231\301\t\000\336\222\006\003\203\001\202\001\252\001\217\257\311\363\255o\3515\331p\276\032Y_\325\344o\325\332+\016\267\243~\320\332\024\373\367\213\347\260+\347\032\221fF\266\375\263\317\324{c\240\236\306p\016\373\035\331\256\246\266`\277`\3176r\214s\r\242\352\315}\351\276\221\0137e\301\241GU\250\031\377\354r\3205C1\227Sa\376~\226\243\352\225\351T\350\342h\275&\2678\370\272*\375\272\005\354\317W\034*w\326AgI\305p6\304~\203\035e=\352\370\342t-\371\263\365oy\024\317\274\365\233/\264$\332\337\315\356y\245_\303V\371;j\225\035\253\\\306s\247\372\233\345\277G\325\232\233VM\345\370i\005Q\236\247\335Pl\312\234\206\373Q\233fov\216v\326e\323jl\233\206\301\026\311\325\030k\233\366\226\266\275#\354_\265\031\315\205s8\274\331\263,Z.P\204\312{`\227)\347Y\367\232\352L\363\005?-\357,\375\200\360\255\353\372\205J\326\360Q\341u]Y\033*\236k\267\370\r\305\264\373\244l\375\327\332Ny\317\037\233\357\273\375\204\327\365Q\271|T\262\203\256\377X\372\225\206\251\217\352~\262\347\334\225K\205\371\223\237s\037\235\355\217\t\221\211\020&\222\351c\261?G\261\253bO\321\232\351\352]\243\317\267\377\205\361N\005{\306\r~d\230\\\251O\347\026\207\357\337\237?\370b\354\037_\375\307\263\364\255g\307\240\343\217\275\364A\347Z\244\\[\267\2713nCK\236\265\261\264\224]1\036_\324\235\371\022\347(0\246tB\2056\270_p\274\336\354z\372\326;\027\320\277\266\325S]\235\322t\313\340\246q\341\267\244\232\362\n~\215\2729\323\017\273\2114#\203\372\226\303l-\0276\271<\377\016\277Y:\033\336\030\364K&\212U\366\251\215\311\253\24755\204Q\321\2770\235\177\r\343\321\2345\3725|\001cZ\375b)\030\256\270\357\027\367\260\277<\355\232\325{\326\361\243\272\276%\377LKO?Z\272\241\275l2`bJ\330A\260q\r\347 j\365m\352\3322\331\377\206'S\010~\030\343\362\032\235cSv\371\006c,\355.gI\330\303S\350a|\237\013=O\2637\323\260\364\322""\270\330=\377\307\236\255\213\rwk\214\221[Z\235\263\216]e]\036_\360syG\205\327=\3343o\033\313\360\367\257q\233\276\213[\276omq|\277:\252\253NYV\334{K\r9o\221:|\351M\257<\006x\361}\317\334\346\\\3309\316\316u\005\275\273/\035n.S\226m\303\237\267M\005_\214I^-\375\274\222T\370f\307]9g\341n\255\355,\252\230\267\216q\230\352>|U\3316\316\032\313]\306\263]2}\376.#0\346?\315\277\035\273\300\307\2712\237q\203\237\275o\375\373d\354\027\326/\306\245)\215\207\265i\356L\366\332w\3649\254\035\243\rqD4)9C\245\223\003j\210\rJ\316\036qD\024\027\014\007f\007D42D~\"\212\t\331\344\006\002\244\016\2225V\020Ye\227*\241\022T\256\220=\304N\311\"S@\234J\255\254!5\234\314n^M\236H\r\035\223U\212(9\023 \310A\311\314\200\304Pb)0 %\212\202\231\002\222\234\223L\223y\210\265\300T\346\311\274$\216Q\033=\210\013\276\261B\311\251\221\252q\300\370\240\344\004\231\0363\245\344@\266\214*\021\245\344\364\210(^\007H\316\021\221\034O\331)9xf\036\222\323@\201\234~%\030Y\"\001\361\304\253d\004@\311\220\216\020\220\331R\206\312\017\"gG\310\266z\212\223oD\252\367\034\206^i\343\377\357s\347\377\264SU\317\235[\267\271o\233\313\031\373\215\343\255\345[\355\220\265m^m8\n\332\360\0133\267\271\3767\360\202*\366f\037\036X\363\2037;Gk\336\\\3677\317*\325u|U\236\332\260\277\252q\274\202\341w\331/\256aw\361\265\264\337\335\353\234\375k=\367\325\255\325\337\366\341\353c\333\300zk^\341l\355\025\307\306&\177\376t\3134\323\274UVv\354\375fC\025\210]\225\277\320\372\326Y\3376\356v\335\266u\2520u\377bp\353\362\005\271\314\345\267\341\345\266\267\276\251\356\366x\313\375}\227\313^\353\345l\270N9\327\3707K\267\312e\277\234\312\245\234u\345\336\266\357F\027\312\340\334\232\230Q\315]\321\246\301_\030rM\323\2016\252\265\001S\023\003S\003\306\3067v/\241\327\001\221\263e\tb0F\314\202\220\220-D\006\"\247\314if\023[\001;`\216\370\314\204\204\310\016(^\nr4YM\354\003l\245+UN\326\013\321\001\311\t:\215\rj^7B\010\210\200\030[\304\220(\343U\"\322\200\004yf3\257\004#\000HZ\214\037$\314$\214\004F\227\347\304\370\2426^\370W\277Jh.f\320\204""\344\020(Y\310\013\244\207,0>0\271P\240$\261@\246\244\260\3146Qh\342\311\010\000\003'Q\023\303\222\263Sn8\345\220\230\0050K&\247\007\226bv\030\312\000ei\234\340\0006cj&\003\023\243H\r\345\251\274c\005\223\223\365R\220Bv,\321D\214D\0144\303\274`\276 \027l8\221$H\320\014\320\310A\014 \246^\tH<-\243\021S\301V$r@\016f\016JNO\351a\004\300\200!\036q\301\010\200\tC\000\314j\306\033\261\325\346\000\223\244t\215=\2020C\246\214r\306*$\212`\033B\014f\014\032\304:1\225\247!{\021\235\036\231\213\350\354\310f\210N\321y\212\221Dg\307ZD\332\254\200\010\345\344\354\010\t\275\016\300(\230\035s\004\213\034\2213$\210'q\204\374D8C\262\0101\256\024\216\026\"\234<v\314v\350\230\351\250\231\345\330`.\246\207\322S\212 \345h1\026\025g\010\226\342dv\022\033\2458A0\017\254\003\0235\2305\220AJ\030!\220@\304\026OD\322\253\204\2541\206\306\0109,\231\006\331Jl$:A2\0331\0176\000\3062W\"\314\"\264\354$S\021\243\201y!\023d\256\224\"\222f\364@\342J\010q\001\n\251\221\031rN#\206qEd\200\340\014\211\014\004\224\016\310\016\37119A\243g\204`rvb,\260\032\363\006\007yc\274\021\035\230\234M\236\220(FP\203\211\250\342c\222\204P\241\221\021\021I\222$\035R\030\010\020\215\302<\317k7B\321`\317Ad\211\214\214\210H\222\024\024\352l\035\020\027\276\331\321\262\274\211S\267)\245\222\316\312\353YI\2660\326\352\364\346\371\n\n\266V\215T+a'%\026*\331\231\264\035\376\323\r\207=\245e\302Q\273(R x\006\310\263!D\341z\226]<l\270K\335\370\320\240\367_\003\010d,N\231\256\371\316\247cIR9<yf4\201J\343\316\\\207\242\321\315\225T\362\024\377!b\232\254<`\273\221\320\201\357\363\345\370(\021\334\025\307\030S\371\177\351\007v~MmR^\314\341\323\333tp\206\243z\014\322\301\253#^\227\215\036M\341k\275\241\0263\036as\034\246\206Y3\314\347|{\024\232a\251d\316\255\265/S\325]:\364\3265\326C\321\007e/{\033H\221c%\371\202?\243Y\366\005\023\251\305u;\226z\306\242\014\320I2\347\321\367\206\233K\003-\007M\246\321+\304\3428}\204\310\362'\220\n\324\205\200\353\2243\201cv@a\366\354\010\265\354\303*\023\227:=\3063\353\350\341Y\002\345\t\247\230\336""\037M-K\360\203\370\350fc\"\247\334\260\236\003_\326\204.\371b\216\274\203\366\310\036`\021\341\335\013\365\\$s\216G\235\033\307\240\375\\.\253\363l5\302\322Gs\233\255\343\333\221\325A\311\323\003d\030\244@\034>N\032\335\027\345V\253\205\324\354`\344\257\244\350_\021@\356\214\004\025\006\022j_qS\303\007\017\n\237\364\217\315\231#L\021;r9\327\270LH\207\315YH\325\026\326\260zv\256\317;\225\240\247\250\020BV#\324\270Tx\215\013\377\033\227\222\007g:9\373,]\273H\003\356\216\352(\026w\227\363T/!\347\255\016\320\375\037\253\211\t\030\302X&f\014kJ\"\375S\2654k\254\255w\022\002@?\211\213J]\\7\260v \036R\326@\037\347G#\257\304\016\222\226\310\234\265:\243c\231ZU\222\031\202i\324YX\306bT\005;\010\002\373^^}\273\000Nu\020\324\347\311l\240\207R#G\244\017\324\235\031>\275D-\303\265\026\327v\375\347P\226T2\307\025H\374R\242L\235OE3\017\016\311\220u`6\273;m_\003\330\0233\203\247\220mVs\277\000\240h\215\001\214\023\030\234=a^|\306f\017\205\007\247\023\214\227.{V!\214QTe\313\010\000N\251\037f\353 \025Q*\312\366\010\233N\302@\023\002\351\256>\234\371U|\362\310\202\367\324\031=2?\227\345\347`\230(=\036a\201\341c\341\0000\325\214<&\370j7\026\317W\\\306\264\t\231\300@d}m\250\317\nBxw\n\255\202\222'/\005!\246_\001T\241,\267;\005\036*}\001\355{\365@\327|\3077\324%\204'\376-t\276 2\321!\345\364\230\341\017\002\332\253g\245\024S\027F\023\003Z\013\r\240\213Cr\207\314\321\034\300kr\232C\251\317\367\246k\330C\2346.\253\274,\221\237?\013?a@C<i\005\273$\204\241\017\274\327y\255\355P\200=\265_\034k\000\256h\261\350=A\201\230t\005U\273\027\261fU\330\261\327\224k\323\324B\234\314\rDh\034e!\314T}\370\353\317c>\273lF$\252\341\021\271{\030=3\262\2227\2352\370+X\000\254\266\245,\321\032/%\221\307eM\207tG]\021\207K\006\221\214\367$\014\337C#\277x-\246\036\374\207\305\236Nr\335\022\221\004\260\244\271\217N\216wC\355\272\311\264\227\2259$\313v\2648\235\204\027\351\277.\243`M\241l\0242\2138\\\224k=}h\014\357%\r\305\340\022`\345\266yR\032q\014\227\026\273\346\227\245C\031D\371PL\262\373-`\253Y\200\030x\0267""\0051\272\254\332@Hnd\325D\336\360I\337\263\300\022\n\207S\362vo-\336i\355Tm\316z\241\224c\375\031;\245\3029\214q\365\371\242\001\006\023\241c \016\357\367\2031\024+\200\025 \234\025\274\312\242\214\272\344\025D:\314F\351\001\226\027\201\262\003\210\003C\246\001\010,\256\035)p\031\373-\223\204\265#1\240\020\250\372;\231\376\036h\241n3\014\214\252\273#\244\337\326\360\261\n\277l\366\226\217\004\204\250\t<n\323\227\354\030\204\023\345\353\337qu=<Q\356\021\336\023\376ig\004U\003\372C\222\031\253#\t\346\020m\327|[\014\030\312\330\035\352\365\203\327Fc\251\376\007\023J\253\377\203\003r\306\003\330\037\027\355R\336&\205-l\227$\357\340\001\002a&}\021\355\\\232\347:K\377}\333\233\302\031\361\230g\335\360o\241\030R\024\341Q\014)+\300\037\345y\213sH\005\003~\360\233\326\221N\272\350\016\026/\226Lu\310\215_\360\250\221\242\253C\030\252t\010Th\323I9\324\271\272~\005 \026\314\257\tn\007\354\276qW\0346k\n\021\364DH \240\302hb\206so\030\270\352\017\2409\007W;\026t0\356\353\340V+I\210\346\252\277\305\233\220C\371\220\215\210\035\024\372=NY=\320y7b0>\305\361((h\235L\345\253\350\321GZ\225@\021\366\203\330\231r\320p\010G\310\263?\336\300a;\222\232`\260,\3133\027\022e\017\350N\201^%%\031\204\234/\350\252\0375\201\001=\023\211\314[\202b\253d\304\203>Fhh\017\373\217<\000j\267\211o#\273\364\245\366\277\360\325r\247K!\215\256\277\213\241Y!i\014\307\t\320\032\0044\237\273\240v,\260\271\3253\306\2023\017!\372mQt\001\331\013\010\372\243\216\r\001:\000=\327;\230\365\025\330\211t\324L\016n\352Ag)Q\311`\3110j\240\007\217ZRiP\213\365\227\371\303Q\026\002<\225\016\"\314\257=\325\"\310\320=\2048\034\"\002\367\265\316L\362v\324B\022O\316\317\272\3173\023\265\302\203<\006\201Fx\245\007\260\200\t\226j-\315\203\330\215u8\233\317X%\346\264\304eF\344/\247\342\035\257_1\211\322\363\r\007\337\014\310\271\377\327\327%|\306\016\3345U\017\270r\257\0201\335s\025\004\244\210\270I\362\217,\221t\235\033f1\237\\5\275\221;\354k\345\021\262\222\024\306\336\366]O\2317\322\2318$\275\363!T\212]\206\013\346\022\257\033""\334\026\223)\305\262\r\337p\341/\"\344V\251\r\351\031r\321\247Le`S\266eO\201*m\220\3672;\017\257%\365\030\202_\0071D\211N:\2021\251`\3320$4\200F\315\243w\n\222Zm\344HX\343\326\376\361 )\215Eh\206\306=\272\023j\364x\337 \377:\004";
    PyObject *data = __Pyx_DecompressString(cstring, 3610, 3);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (3691 bytes) */
const char* const cstring = "BZh91AY&SY\332@Q\204\000\002R\377\377\377\377\377\377\377\377\377\377\377\377\377\377\277\377\377\374@@@@@@@@@@@@@\000@\000`\017\017\206n\334\353\234\220\252H\226\001\250\326\320\004\203\335\217s=2\032W\226\355\242\360\001\274\tDB#)\26557\252yM\232mL\001\224\322\237\252zh4=MOF\324d\014\201=L\322f\215\006\200=OQ\352\003\321M\344\321OPi\242\000\200Bb\025\037\246\010\323ji\004\364\215?P\000\001\031\030\000\000\206\010`F4F\023L\r4\321\004\232S\365\t\351&\303Q\251\342\231\224\006\215\000\000\000\000\000\000\000\000\r\000\006\200\022\236\242T\200\031\032\000\000\000\000\000\000\003 \000\000\000\000\003 \310\000\0100\000L\000\020\304\3010\000\004`\004\311\202d\300\000\214\214LF\002\030\000\000H\220\200 F\020\305O)\264\233B\236\324\364\rQ\352f\221\240\000\000\320\000\000\000\0004=@=$t8x\221\260ea1\355\355\204/]\013\3023v\375\360/:\321\233\321\034W\234lEb\006\360\311?:\01781\266$\307\302\205K6 \366\214I[yEP\024)uv\241\\\304\304\332`\230\346NII\321J\312\266\240\315q\244\033@\360t\025\310\271\2116\206\322\033H9\022\252\204\304Nr\002f}\342-T\231\302\304\306\255\266\324)\324\212\0203 eYLPe\"\201(\314\022\036\010\017\\\316q\266)4@a@\311v\025\200{\322\310\340\327 zQ\254\206M\211A\254\020-H^+\306\202\242\350\203*\344\344`\r\302\024\233\230\326\027\233N\017\010\310\252\365M+;\261\27774.<is\313v\317\317\371\317\213\024\214\313\257=\035\330\257\021\005\272_\212:\327^\221\370\212E+\216\276\2168\331\3539;\260\006\347'Md\311OB\313\225T\2043\207\265j7{wo\333\305d\334+\\\363\254)\013\002F\330$\341\373{I \234\000\034\224\305\007q\321\260j\276S\273/\307>3qd\020o\336E\234\006\231\337>.\314d\366\214J\221\251\032DU\345\365pT\244=v+G\267UR\253\033.\266\323\330\371\026H\014\203DF2\220Yq\313\201wo\245.\305\241\025\374\367e\316f\004\232\2620\337\252\310\372\272\376\214g\346*\303>\026\255\336\023\303j\262\372\343;\026\313\210\201\021E6\331sP\307\037\336a\352\340E<\337\237Q\244\r'az=\002\222\2313\326\032$\024!\0024\326\257N~#>}\307p\206\263s\212o\335\304\204?\275\025\270\204g\252\302\226~}\215E\357@""\252\3566\360\205\366N5\344MA\322M,p\231\217\270\026\332\244\313\305\366\206a\377\213\332\004\004\251\010\003|]\246\277\355\326\222@\030\316k{\266\236\346\"\334\016X\323\205`D\344\365s\020\227l\273\276\343Nr4\216j\343q\323e\257\001J\236oi\235\233(,V\010\031\270\333Y\256^Q\031\366\255K\362\"\233\n\006{\211\346\357\2166\233\nS\034Hr\023\204\311,#\031\214H&\200\320\271\303\224\033{d6\177ods\255\213\035\017\2544\214\033\034RrY\367\215\034\324\263^\240\315\245\335'hv\365\266\3338\023\035j\214J\256\333\234\3049X\311\225\323U\316\253\217LmC\nqS\021\322\203\307&\232\355\335\364\014\033\017\257\360\025\250\274\361WW\352\315rpJ\314\252\024\356\331\203\244\342\272\366\364}}~\254:Xt\351h\321\365\177\277\331\320\314\004Ev\031\360\2742>\205L\034\260\007\201N\316\210\214!\264\253\257\244\232\341\307V\210\216\205\321\270\370\202\262\246\370\266\265x\313#\020l\3623\016`\353m\221\313\203w{\203\242p\207\010\003\232\242\216\357$\300jJ|3\353\340;6\\r\333u\357\3034\030jX\356I\201.U\000\274A+Ev\344\0240Uv\316\311-2*\222q\267k\313\314\342F!Jq\262Q\312\252\0247\r\353\375A7\333|\013\353V\253\261\2236\311+unp.\234\377\030\272\206\025t\005ZFj\343\t,\202\305k\030\264\345\002\316\025\254\031\312\263\210\337i\221~\222\271\246\261\212\266K}\274*\361>\010`\345\306MT\313\353Y\004\t\324U\026\231\211\317\204\t\324|\235\301\323\372\376\034\016I\206\223Vq\247JP\356\034\335\321+\240\342;#\252\311\306\263\302\242\017\253\003QL\211Ih\203\006W*T\315U\356\305\323\217\027g\r\235:Q\330p\364_D\345\031,d\365\311T\207r\016\263v<\231\342$s\352\215\0235wF\214wp\256s\024\002<\270h\352\250\373\351\370\007\362 `E\n\201g\362\311\334e\345\003\363\003\026@w\313\214H\322\366\322K\337\231V2Q\306\365\325\3076\025:w2\254R3\021\\\330J\316\r\346\312\\\t\003\201\334\003\222\205\274\r\261\345\331\205\013o\335E^FJ\351\200\271\310\201\024\242M\215\020i\240D\327\r\336\317G\024\t'\024y\221\022\010Q)a\316\231\314\000\345\234\007\3346\272\371\263B\024\275(B\247A_\210\246\013\272\257\371\336l\242\365\360\\\035\346\233 \241\3436\347""\271\274\207\\\370\273\340\247\253\330\274\223\027\275Zo3\257Y\030\326OhnW\326\255\235\215\214\025\244$\364k\342\331\2712\274\021\221\251\033b\336\035'%\306O2qQqc\006\321\300\3013\261\002\230\236\222\271M\350\251R\270\206\334N\r\023\222\270\347U\000d[/1\261/\001\334\352\352^\344\360\370\t:\251T\352\360\301J\332U\366\351\332\rF\276\265#\232\016^\264\035\205 J\200\267-\353\023j.\033M\261\214\233\267\3229E\023\234\n\016\376\271\272_\014j\360\201t\226\034\324\346\014\370\005\323:q2&^\356\221/H\364\362\333\327\025`b\373\356b\272\215\215\244\301\350\033V\001y9\232\004\371r\305\n+C\216e\214u\304\031\330\213o\225\0261\022B;<!\032hm]\212\216\313[\227\020\000\271\310[S\010\240 K\n\223ch\253\244\354\234\353\241\031\027S\311\277\\\364*i\341\221_\376t\225#l\022\315\307H\020)\261\230`\2615\000\273\227\255c5\357@H\240\n\345^\302\300\200\242\210\032Ht\317-s\005\030\207\210\200S\207A\002\344\000\\\270@\311\2118\024\235\342\373\n\t\266{\252\202C\303\247v6\010R\330+\232\332\266D4\221\317\260\210E\363t\\\032.$\326Fa%\260\216\206\311\204D\225\\Bb\004g\330\265\301%\254\034\276\364\010\343\344\206|\255D\"&@R\342\374B\013\002\334S\274\212X\337\370U\242e\221Q#y\237\007t_\242\374\033\006\363\204\202D&k\2535p\272\233\271\332\311\321\"\034u\003*\202\242\023T\211\031\344/\021Cc\013\306\002UM\350Il\3155$,\272b\032E\032\323R\334+;\310\245\307L_m\334\243D\2527\004+\362Yfn<\306\307\240+\256#WB&Ma\205\370\241\2648n\276b/\221\027\2725f,b\344\313\201<\252\300\330\2166\250x}n\243\253\223\265V(\3571j\341\252JX\222\031-\020\021\023\203q\321\233>Dt\007R;\205\352\266\266j\202\033i;!\266\323j\3676\233m\264\235%I\304\325\307t+{\002\000\257\202\242\3122)f+\014,7\274\360D8\031k\2554w\324\321\0363\333\300\271oW\222\361d\026\305\275\211\274\355tH\234IG\242:\225p\270\236\20387-}}\236=\274\344\356\236\376\202\0242\316\302F\356\326$\327t\344\007\303\231\254\030\3335\360Sy-\220\331I\"\222\252\222\255\3474f3\314\215\327\201\252!8\204\201\260c\000lOR<\001\256\244\346\311XH\201[.Rl\346\263;\271\264&\363\361D6\3206\004""\025Gu\020\nY\200\206\0014\0025hI\333c\322\336\265\327K\022Y\225\225Y.\275^W\267\000\353GIQ\1778\327\244\026*\346\000\313\351d\002m\\\320\323\032\345q\275\312yhV\255\225K\203\312-y+:\035\325\213W*\301l\315q\261c;V\010\257\010\314H\"\037>|\267\356\341\327}Vap`\002\036,\232X\205\270P\2569\031FU[q\020E\221G&\302\201\211\305Ef\353\325\300R\326\026\203\352\266\200\355\236\025z\341\202\013B\272\244Xw\210\372\265Y\312\201%\334]\341YXS\010\024\2307!\326\247\014\305\006%\2130\022\304\214\006q\002\246A\024b\222\026\002h\262A\033\026\020]8\2328r\030\023\001\336\033\035|\221\213\346`\321\327nH\013\256\002\032\240\314\355\260e\220Q\204\330\2546\232\372'&\030\034.\342\3449\240.i0L\270\365\357\024\212J\245R\235\345\2230tV\305\222\222rH\256M\222\210\201\220\312R\212A\016l\304j\032\201\315^M\370\222d\030NA*KR\213\021\305Tr\251C\212\3211d\340\027\210$4\303\"/\034\005\035F\206!\013\233\240\252\020`\307g\220\322)\010\2100\214(\300\214(\210(\211\000\227)0#\rD\251b\034\373a(\001\364\"\324\273N\224\204Q\344\010p\347(\334\366v\304\331\327\220\257\302\257O<q\265q\326\371c\"\347\317|\202\373\340\333\277\211\266=O\243\254\016N\331\225\212\006\301\354\203T\263s\200\224S\2438]{\353\364\363\360\273\222\373\265\240\000\\\211=\314Q\303{M\207\014\037T\222\316\034\334\004\360\306\206~:\213\"4O\240-\271 %p\353y\231\250\231\241@0\340\243\340\251\025\031\021\007\251\263\324q\322\203\220$L\362\022\217\207\005S\247\225W\030\027\244r&=P\225EaiQ*B\206\032\006\024$\025EEe\212\246I\207\032\226aB*\352\212.,X\263f\t\243\270\036\355y'C[5%\020\332\255\214,i\367D\225\353\267\244\360\027xkF\333\247\205\231\2503\262Yr\224\312\374v\243\"\206\332\205+\236\200aX\327q\030\025\342\2133\266\007/O\246\006\t^\265\005\205\215\344J\330^\004^\n\032\032\221\223\242\264\246P\206\004\305\232a\016Q\007.\270\2274\037\272DU\004\345\257\305)\367\036\266\036W\256\017\014\301Eh`\037E\201g\010\006\355P>\372\340\231\300\251T\016e\033m1\222\033\025X\335q5\355\223\275\340rm\334\3337\275\265\332V\241\273\0332\221UO\304\000x\213+8c\207(W""\016no\200\206=\260\265\025\302\302\212\t\"Q\314\354\203\203\210\352\036\254\306\234\235I\326hR\234\037\367o!\010\004\200\222s\231\200u\252<\227\217Z\000\271O<\250\324U\003\224$\003`V\312J\007Qa@\313\265#R \226\025\224/\007;\334\340XI\246\017%\251\"A\263\322\221hz\270\243\254\020\240\200\310\270\023a/j\222\346\254q\216e\031\265Hb\35557\\A1\244(\306\022\301\201\236\2507[A\231U2dB\271\266\n\205\002nMl\236NI\213d\364\324\365\304\000\332\020R\206BcT\210\272\205\201%\203C\005\tMS-2\3112\324\264K,\322L\335\304\\M\261wp\220\226B\231\007<\026iK]\250\265\333mX\300W(S\261\344\224\344@(+i\"\010: \267_}\020A\226\"\325@&\355\035\255\330\301y\206\304\331\237\2378\031\307(E\026P\320-\"\370\n\270\347\017\035^E\250\275\373\2104\234\234\203\226\353\302wt\244z\031\240\016\roC\330\326<8H\222\017L\335\240\002\274\276\204\345Y\327#i\342\345\370.\247\324p\026[\253\203\\W\225u\342s\035Qn)o+\224\231}\335\271,U.\227i\330\333!\270a\2026\222\240 \004\002\226mo\210\246n\036v\032\225w\013\303\030\275v\331\267\255}\245_\273\215G1\001\325\021\005\007\335\301\010\322\025\0141\371a\211\221]\374=2m4\332e\246\261Y\353O\010\232\350\212\210*{,~\017\013D\025&\n\004\343f\340\036@\333\0135\030\321\273\212\226ED,\031\251\262\213\301Hi\234lx\272\222\3306\301\343\342\215\177\356Z\021\037\003\313\264\032J\344\271\350\037.h\251o\301-\361\275\207\356\023\030\214a\322^q\355=Y&[Y\270\003\347\340\335\321A\251\365\351O\333a8\240\007\307\267C\352x\322\340\037\037>\331\000\264y\006\347^\240\253\356\274\313\211\320!Y\220\262\217\005$\327\032\206\302K\366\335\301\340n\206w6\222S\200\201j\327q\035)\372\014\253mnz\331\230zr\3642\314\275\360*\023\241\312\3579\235r\026w\326FS\026\326\217\273G\003\n\327\356\025\324\320\255\326\341!m\265\257\252\032\214[\033\271\232\275\031\265\210@b\326E\203\317\311g\275m\322\250\301hc\323]F\254\375\265\2415\262&\240\277\312\263\277;\235\223?7<j$\365c\223S$;q\323\230T\226\004\256\247C7 \010\364e-lyE\317\333\033k\024\261\030\304\360AS=\rH/\376\272\202\303\311\345o\3618\236\232bW\375\027O\000""\341\234\253\031Z\322\\\3017\370\330\270\272\330\372\320\241\360\310\377~UD\3236j\325:\264\351l\244\r\0169+3\252S$\352\3264\353\332\314\377\276\207\230\313\302\331\345\325\305\337C?\204\007\236\271\237=\004Cl\3154W2\027\200\223\241m\224P\007\207b\202\302\024P\tv\200\\i\242M\002\030\0053\r[\202b\263\034\000\177\326\234)\027\255\251WB\225{\231\212\231\211vF\020\016\204\026\006&\260&H\217*\252f\304\022\006\004_\377\027rE8P\220\332@Q\204";
    PyObject *data = __Pyx_DecompressString(cstring, 3691, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (3623 bytes) */
const char* const cstring = "x\332\245XKw\333\306\025\266R\277R\253\266\345g\353\264)\225\324Q\232\244J\224\246\261\232>RZ\017[\261dQ\242l\245M[\234\0210$\021\201\000\204\001$\261\351\302K-\261\304\022K.\271\344\222K-\271\344R?!?\241\337\275\003\200\244d\273\347$\347H\230{\357\314\334\271\357\271\303\245CS\372\241\355\271\245@\372\201T\322\rm\267^\n\033\262$\203\300\013J*\024\241\304d\030\005\256\264J;-\236\253<*\371\"P2\230]\372\301\014,\231\261x\352aA\330\020ai\241\0256\300\311V\230t\354\035\031`\253\323\002\213\3006C\031\320\"\267TY\252\374\356\263\371\317J\302\265\300\366[i\206\252\244\242\035\323\021JIU\362j\245\235\310v E)l\371R\315\226Vj\245\226\027\225\\\211\343C\017\202\253\261\r\020\307-)\031\262\\3\302u=H\014\205\014l\207*3%\313\016p\210\275/i\367\262p\224\234}\346B\022\313!\206\242\376E\351\276\232\375RX\226\201\255\362\243\022\024\261]K\036\226\030\364=e\263},[\211\035GJ\227\276u\323V\032\262\374:\004\tg\365\360qf\023\277u\370gR\333\255+/\nL\371\327\362V\331\201\t\026<\027da\273a\331(\007\201h-\035\372A\331`r\331\320\010}\215'\020\241l\254\270\226mJ\245\001\326\302s\313F5\024A\331\004]U\002{\277\\\257W}\307\0161\006\262Vvl\241\262\243\034\207\rQ\r\233!S\026E(v\204\222\233\262\006O7h\301\231\271\252\014\317\322\n\202\254\211\310\t\351T\0336\220j8\3435\241T\201.\271Qs\210\354#\250\266\002\273>\244\034\206\322U\020\rz\003\n\325\331\231\202\262l\035\014a/\220v\335\255\312`_\006Cj\344\232cz\256\357PT-J_\272\226:E\255\232\r\331\024C\242\277,\232\266\323\032!P\324zC\356\353\007\356\310Y\025\317\261\315\341\352J\264\003\234\255\\\326\3169E-Vnz\316\230m\031\317\221\252\334\033\302\210\336\241\320\325hG\231\201\355\217\361\032%n!G4\261\245B94\372V\025\266\255\331\365b>'D\301\270`[\325E\233E\027\301P\257-\212\354\205\2465D\326\274}\360q\306WT}a\312u\226C\235\232\031\303\206B\000(\246\236!Q\326\204OIZ\320\\A\211\n\005+\216p9A\026<\211\374\341\314\310\363\345\241\r;Rn=\364<\207\t\331H\354\t\336\222*\314a)\334l \352\302\326\322B\313\204n\216\210\224\004\266\206\022\025\330\302\261\377CXU\212""\300ld\223\302q8>\017C\002I\304\005$\003\235C#q\313\341m\224\240\205\2064w+\0362\233W:\236\222\025/\010\205\336\350D*\324a\004\253\222h\013\236p\244\322\212i\025\267<\235D\343\330s\341DR\223\236\333be\235\301<s Y\206\"3\232:\341s\3254\242\331;Q\323E\356j`\223\200f\023i\227\r,\025@\004\0239Koi\242\220I-h\223K\240\314}\247K\230\236\312\213\331\020RY\220\203\202\034\r7\275\003\252\342\232\247\317\001\266\020H\010Vn\016a\2300\034\301xg^\0034mX^4\236\327\227\014\033-0\031i\264\216hRVH2\344t%\031#\027!\234QG\n\214\246\254\373\013t\373\254 \343\306\010\243+\206\205ES*\253\302\035\221pXI2|\274hh\342&\266\214\010\222\027\r\215\rKY\206\353*\222!y\031\311\321\002:UQ4\2255.\253S\004\316\357\021Z \\UC\244\215\222F\255~*\2435\321\332a8\n\002xi\275F\241\260(\221P\236\231\311\265(q\225\007\022+\224\256\273\010\325%G6\263A\027V \266\233-wd\276\221o\333%\352SF\341Y\303@4\032\306\242\255L\021Xk\236%3\220w\331\312w\240\027\205\276\032C\260/\220VdJ\303\344F\2069\214M\243\315\340~h\270\300c\226\201\347?\224\r\261oC\020\300tgX\371D\3564\202\213\361\224\023\2106nq\242\2342'\221\2641Y\313\245CiF\332\020\260\251\223\345\307\262\014\315\306b\336+0\306d[:V\025\22633\020W\234\\v<\021.\007^\223|BANu\216\306\034'\026\025\021\210\246\034\271f\013\002\331\365\021B\"\3145d\244\000\266DP\227\\\206\037\005^DJ\020\207\034F\231\030\001\251\333YA\235\t\302<1\213\330~\t\231x\256P\207F\341\301\000/tkhz\270\3701(]TW^\340 r\026 \354C\304\334\356\212\013\253\206zC\210\036&\300\340\351m_\241z\223\3524\322\031_)\\\350\365\272.n\221\t\2231%\250G\024\017\032\306\225\204%\005|f-h\033\221\014NO\344\3212\n\347G\216,ei\306I\371\252%\327\364,X\217\341l\031\215\353>At\037\210p\010\345\273r\357\022\274\202\366QZTsx\352\211l\361eC\260\356\2252\3054rJ\201\365(\364#>\240\302y\227\361\334\210\320B+\2026\371\305\220\tX5\005R<_T\315o\334\234\300\241_\000\372\232:\205\346\n0\251\"\302F\325\227&\021X\346\234\021#\371\322\355\000\271#\203\325\365\247\217\214\265\362\327\253v\323\016u\263\262j\3436\346tY\365\204\245GsW\007\001:""\013\351\326\303\006Q\362\231ma\207\272^\023\006\235\364\3225\211\010\327\345\211A\364\022f\203B\2311\332\254\201\310\347\020\206\351\031\347nA3\260\3355qH\302kh\335_C{m\227\225B\254\343\236~\212D\263\020o\264\002\257,\273\306\367\305\323\310\341\016'\037I_\355\243!\264m\207\rlT\353.\335\354x\034\260\224\204\2715\350q\006\327\362\014q\035I\374\305\005\031\330\024i\244YeU\013Grp!\340\017\317\020\000\231+E\031\256\234)\310\240\204\374\230z\350E\256E\036,(h\213\n\230\262\266@\370\n\304K$z\031);X\223\307\370\301\215\210\353z\013!N\235\014\313;\274aa$^}\206B\026\034\241r\264A\356\326!\376\251O6\236\242\351\202\226\234\323\374\251\362\373nsk\211d\301P\221A\323V\324z\240\ny,j^9\365m\216\322\317u\2301>\200\346\3071\304\374\220P\025M\337\321\255\300\326\216\263\344\206A+G\3068\003\207d\014>\027\301\246\340vgS\nvXq%e\217?\304\352s[fK\370\271;\014\241\214\240\347\034\261#\035Mu\021\216\232\350\223\201V,\372\261 li\222\322\365^\247\275&e\005@\307V\201RP\025\210\316\307S([\222\356\0248$\037Y\202\354\236\321\360A\326\2442?\357 \033\326D\220%\362f\244WW7V\271,\024]\334)|\335\327\325\211k\265\216\371\2524WIm\336\316\316\322P\250_\207\304d\024\326s\350\330\365\363\270\212d\177\330\322_\334\304\032\240dU\004\362\255\227\227\032\364h\024\354\3725\203\310X\265\335\335l\340v[\277\203\206\335\202[\207\373\212(\031\002X\313\310\252\275\233\365\377#\221\223\023\310=\034=[\336\256t\271\231\023E_{\n%\027Po\207\373\221g8\247\266\002\234\2255m\334\377\013]|\250L={\372\344\351\372\366\323g\270l\363\332\372\314\267\262\305\317\205\031EM\212%b\2431M\017(Rs\357\023/\3406\213\256\233\202\0214\333\240\321\206\307\241K!\314\017/\0358yDo/\254\323\346m\374#LX}\r\303C\032 \253\r\241\315\210\n\237\305JR\345\034a\311(s\370\272\311o\314lX\367\001\254\027Op \305\255f\030\331\217P\004\241\006\303JB\265\\<\323fM\017\336\207\033\361\362\243\246\304\260]\003u\312\224;\302\3345\361b\323]\2332Q\263\205B\315D53\274\232AkM\375X3L\224\3160C\224\251\177c2\271u\3063-\373M\316\360\003/\364v\242Z\206[\206aQ\361\312\007""\3133\rC\"\307]\313\340T\227xO)4\330p\267\017\206XR\203Y\014\003\021c\200mXG\311\330s\214\354]\306t\335\007\0336\355\307\006E\212\333\312(4\304\213\261I\377\n\367\245\265{@_<\302\351\0361\016\032\230P\324\351\362#\000\034\035\322\3037\014z\345\321\367[nZ\314\206\221/h\212C\266\202\341\360\345\3344\303\303\246TJ\324!\002\232Q\301?\006\002\264]\017\367L\323\263\"\252\333\200\002\017\212\202\271T\204R\005\323_\372\267\302\310\247e\256<\340\017\035\240\014QCokd\026.\250;\022\017\037\231\223\275Z\rO\001\3755BO\033\021j\264\014\345\320\017v\236\037\252\314\023\216_'\323}\213\206DS\200\025\3008\271p\233v\232\376E1\377y\221\177W\364=\030\311\327W\032\003a\3302\330c\371VPqY\231\024\300*jj\014\316CY\322p\3466\002\351a\256\241\310\365ms\027\246\030{\357\030\306^$\034m\262=\272\352\212\347\221q\346\241T\020\344\241\221\235\027H\n\027i\005\354[\205\367\227K\377\331,\203!\025\"\202p7\341R\254\361\003+s\022 K\327\323\221g\227\361\222'\230\242\037?\371\203\267&\247\214\316\033\366\t/U(\t\374\237\265!\370d\361Fs\370Rp\262,\364\033\206C!\232\371\035JH2S\304\245,\"7e\307Gam~\237\256\021\225%\305\001\n\205\241\275\364bbp\376\303\366\\{\2713\375b\342\373\311s\027&\217\376\020_\212\367\022\320\257\036\211\2237\177:\270<\325\237z\277=\321\236:9\177ap\371\312\321\347\361\324`\362N\\K\226\323\367\3333\235\251\316\364`\362\347\311\305\244\226\226\007\223o'Mp\003p#\376 )'\177O\275\316F\247\326]\356}p\\>\3368\271|\255\177\215x\335i\177\327\235\351\335\351}\327\337\254\236\374\354\352`\362\343\366^g\342u\022\334O7R\361\032\t\376\357\301G\373\375\333\367\323\355v\271\275\301'~D\320\353N\234I\367\332\023?\356\304\370\337\351\203\366t{\216\017\234m\213\366\336\253\017\214\337N\366\322\037{\3367\351%\226\232\316{/\025)\235w}\354\274;q3\235\203\247\370\340\363W\372W\340\216\\\343w1\263\002\363\3442\334\211\017\0221\230\274\025?\201h\027S\331\236\033L^\217/\304\317\222\351\344\363\364v*\006\327\357\306\373\311\327\351\337\241\332~g\273\273\330\233\030\\\377E2\225L\017\256\227\322\211\364n\373'\264""\347f<7\370\331\315\370A\362n\262\301\330\311i\335^\241\322o\322rJ>\272\363j\025H\364\033\361\357Fl\367 \236&\333\325\223\347\351|\373Ag\27237\316\277\336}\336\373\342x\343X\260\225\356\365\357=\350\354u/v\353\275g\307\323\203\371\205\336\203\343\373\307{'p\310\275d.y\222\002\234<Z\212o\307\"\376.\005\347_$o\245\217\264#n\365o\315w'\272S\335\351\301\037\027z8\346v\377\366\037\t\355\316\r\276X\354\225O`\272%X\343\343\366T\373\203\316J\327\200V\377\350o\177\323\377\346\237\375\177\376kp\357\327I\304\254Vq\274\331\273w<7\270WJ/\350\030\005\263x#\206\365\337\202\024\217\323\005\310A\342~\322\231\350\374\252\253E\317R\342\312\321\034\262\370\366\235\321?\n\262y\250\365f\277\314G\315/\367\304`~\251\2671\230\207\\\203\371\307\307\023\203\371\225\343\251\301\374\032\354|\236\316\370\n\341\022\302^\263\275\211\336-,$\303\336\354\337\234\203\203\336\353\346\266\235\207'a\333\006\222\375q\373Qg\256\303\341\370Q\"\222V\373r\347bGP\030\036\"&\266\311s,%\227\216\3769\230\006\031\367\375/\317]\270\021O}\177\361\334\205\017\332S\257H\005(4\230\274\333\277KGO\237\020\364)y\3615\"\27445\032\335Z\357\253c\241}9\225\261\315W^\276z\264\023\277\021\277\217H\205\223\036#\026\247\323O\323\r\342\360~\362\036B\367F\372e\347\235\316c\304\342t\357\323\036\207\355g\020\363bb\2453p'\266];\332\033\\\177;\361\332\033m$\302\375\264\312u-\350\334\354\224;[\335\273\224\n\277LV\333o\264\337\305\n\2533\323\235\032\\\327a9\227\256v\336\350\177\n\237\2340e\003L\337kO\014&Y\316kGQ\\\2167\306r\370\247\347.\334\216\313\344\353Wg\001\234\365yGt\366^\353\252W\233g\304 7\342\031D\355L\n\201\177\215\304\272\334~\023\236x\007\014\256\377<y3\235J\337I_\016.\266/Q\031?9\253\007\273\362E\231R\3657\261D\264\225I\304\337\037\211\243\020e\341\035\240\223w\3430\371\003\014?E\226m%\227\022X\367\255\376[\037jw\301\330?`{\362\027\n>\275{\342\373\313\347.\\=\332\352OM\247\267\340\351\363\223G\217\342\271x9\371\010u\354\374\245\027\373G\333H\326[\250P8ezp\371n\014\313\020\327/\251H\321\212\275\001]_\263\360\345t\347A\367""\303\336\366q\371d\234B\265\n\241}\355\010\034\311\003\237\303\214\277M\347\262\263^ \213`\317~\351\223\316\225\356\237z\273\375\215\315\301\371\233\361_``\222\022'\374\027\332\340h\\\206\375O\376\326\273z\314l\346\376\007\215\337jN";
    PyObject *data = __Pyx_DecompressString(cstring, 3623, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (7993 bytes) */
const char* const bytes = "Exception representing the error state returned by the PG parser.Exception representing the error state returned by the PG deparser.Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Unhandled tag: %s.?add_note, at index , at position disableenablegcisenabledpglast.pglast/parser.pyx<stringsource>ATAlterConstraintA_ArrayExprA_ConstA_ExprA_Expr_KindA_IndicesA_IndirectionA_StarAccessPrivAggSplitAggrefAliasAlterCollationStmtAlterDatabaseRefreshCollStmtAlterDatabaseSetStmtAlterDatabaseStmtAlterDefaultPrivilegesStmtAlterDomainStmtAlterEnumStmtAlterEventTrigStmtAlterExtensionContentsStmtAlterExtensionStmtAlterFdwStmtAlterForeignServerStmtAlterFunctionStmtAlterObjectDependsStmtAlterObjectSchemaStmtAlterOpFamilyStmtAlterOperatorStmtAlterOwnerStmtAlterPolicyStmtAlterPublicationActionAlterPublicationStmtAlterRoleSetStmtAlterRoleStmtAlterSeqStmtAlterStatsStmtAlterSubscriptionStmtAlterSubscriptionTypeAlterSystemStmtAlterTSConfigTypeAlterTSConfigurationStmtAlterTSDictionaryStmtAlterTableCmdAlterTableMoveAllStmtAlterTableSpaceOptionsStmtAlterTableStmtAlterTableTypeAlterTypeStmtAlterUserMappingStmtAlternativeSubPlanArrayCoerceExprArrayExprBitStringBoolExprBoolExprTypeBoolTestTypeBooleanBooleanTestCTECycleClauseCTEMaterializeCTESearchClauseCallContextCallStmtCaseExprCaseTestExprCaseWhenCheckPointStmtClosePortalStmtClusterStmtCmdTypeCoalesceExprCoerceToDomainCoerceToDomainValueCoerceViaIOCoercionContextCoercionFormCollateClauseCollateExprColumnDefColumnRefCommentCommentStmtCommonTableExprCompareTypeCompositeTypeStmtConstrTypeConstraintConstraintsSetStmtConvertRowtypeExprCopyStmtCreateAmStmtCreateCastStmtCreateConversionStmtCreateDomainStmtCreateEnumStmtCreateEventTrigStmtCreateExtensionStmtCreateFdwStmtCreateForeignServerStmtCreateForeignTableStmtCreateFunctionStmtCreateOpClassItemCreateOpClassStmtCreateOpFamilyStmtCreatePLangStmtCreatePolicyStmtCreatePublic""ationStmtCreateRangeStmtCreateRoleStmtCreateSchemaStmtCreateSeqStmtCreateStatsStmtCreateStmtCreateSubscriptionStmtCreateTableAsStmtCreateTableSpaceStmtCreateTransformStmtCreateTrigStmtCreateUserMappingStmtCreatedbStmtCurrentOfExprDeallocateStmtDeclareCursorStmtDefElemDefElemActionDefineStmtDeleteStmtDeparseErrorDeparseError.__str__DiscardModeDiscardStmtDisplacementsDisplacements.__reduce_cython__Displacements.__setstate_cython__DoStmtDropBehaviorDropOwnedStmtDropRoleStmtDropStmtDropSubscriptionStmtDropTableSpaceStmtDropUserMappingStmtDropdbStmtErrorExecuteStmtExplainStmtFetchDirectionFetchStmtFieldSelectFieldStoreFloatFromExprFuncCallFuncExprFunctionParameterFunctionParameterModeGrantRoleStmtGrantStmtGrantTargetTypeGroupingFuncGroupingSetGroupingSetKindImportForeignSchemaStmtImportForeignSchemaTypeIndexElemIndexStmtInferClauseInferenceElemInlineCodeBlockInsertStmtIntegerIntoClauseJoinExprJoinTypeJsonAggConstructorJsonArgumentJsonArrayAggJsonArrayConstructorJsonArrayQueryConstructorJsonBehaviorJsonBehaviorTypeJsonConstructorExprJsonConstructorTypeJsonEncodingJsonExprJsonExprOpJsonFormatJsonFormatTypeJsonFuncExprJsonIsPredicateJsonKeyValueJsonObjectAggJsonObjectConstructorJsonOutputJsonParseExprJsonQuotesJsonReturningJsonScalarExprJsonSerializeExprJsonTableJsonTableColumnJsonTableColumnTypeJsonTablePathSpecJsonValueExprJsonValueTypeJsonWrapperLONG_MAXLimitOptionListenStmtLoadStmtLockClauseStrengthLockStmtLockWaitPolicyLockingClauseMergeActionMergeMatchKindMergeStmtMergeSupportFuncMergeWhenClauseMinMaxExprMinMaxOpMultiAssignRefNamedArgExprNotifyStmtNullTestNullTestTypeObjectTypeObjectWithArgsOnCommitActionOnConflictActionOnConflictClauseOnConflictExprOpExprOverridingKindPLAssignStmtParamParamKindParamRefParseErrorParseError.__str__PartitionBoundSpecPartitionCmdPartitionElemPartitionRangeDatumPartitionRangeDatumKindPartitionSpecPartitionStrategyPrepareStmtPublicationObjSpecPublicationObjSpecTypePublicationTable__Pyx_PyDict_NextRefQueryQuerySourceRTEKindRTEPermissionInfo""RangeFunctionRangeSubselectRangeTableFuncRangeTableFuncColRangeTableSampleRangeTblEntryRangeTblFunctionRangeTblRefRangeVarRawStmtReassignOwnedStmtRefreshMatViewStmtReindexObjectTypeReindexStmtRelabelTypeRenameStmtReplicaIdentityStmtResTargetReturnStmtReturningClauseReturningExprReturningOptionReturningOptionKindRoleSpecRoleSpecTypeRoleStmtTypeRowCompareExprRowExprRowMarkClauseRuleStmtSQLValueFunctionSQLValueFunctionOpScalarArrayOpExprSecLabelStmtSelectStmtSetOperationSetOperationStmtSetToDefaultSortBySortByDirSortByNullsSortGroupClauseStatsElemStringSubLinkSubLinkTypeSubPlanSubscriptingRefTableFuncTableFuncTypeTableLikeClauseTableSampleClauseTargetEntryTokenTransactionStmtTransactionStmtKindTriggerTransitionTruncateStmtTypeCastTypeNameUNKNOWNUnlistenStmtUpdateStmtVacuumRelationVacuumStmtVarVarReturningTypeVariableSetKindVariableSetStmtVariableShowStmtViewCheckOptionViewStmtWCOKindWindowClauseWindowDefWindowFuncWindowFuncRunConditionWithCheckOptionWithClauseXmlExprXmlExprOpXmlOptionTypeXmlSerialize__annotate__argsastasyncio.coroutinescline_in_tracebackcollectionscommas_start_of_linecomment_countcommentscstringcursorposdeparse_protobufdeparsed__dict___dict__doc__endend_indexenumsfingerprint__func__get_postgresql_version__getstate__iindent_size_is_coroutineitemitemskindkwkindleading_whitespacelocationlstrip__main__majormatch_locationmax_line_lengthmctxmessage__metaclass__minor__module____mro_entries____name__namenamedtuple__new__newlines_after_commentnewlines_before_commentoffsetoffset_to_indexonly_slicesoptsparse_plpgsql_jsonparse_sqlparse_sql_jsonparse_sql_protobufparsedpglastpglast.parserpop__prepare__pretty_printprotobuf__pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_Displacements__qualname__query__reduce____reduce_cython____reduce_ex__resultreversedrstripsscanscan_resultscan_tokenscannedself__set_name__setdefault__setstate____setstate_cython__splitsplittedstartstart_indexstatestmtstmts__str__strstrip__test__tkindtokentrailing_newlinetreetypeupdateuse""_setstateutf8valuesversionwith_parser\200\001\330\004+\2501\250F\260!\200\001\360\014\000\005\014\2105\220\007\220q\230\001\330\004\016\210a\340\t\n\330\010\021\320\021(\250\001\250\021\340\004\005\330\010\013\2106\220\021\330\014\026\220f\230F\240(\250'\260\021\260!\330\014\030\230\006\230f\240A\330\014\036\230m\2501\250A\330\014\022\220*\230A\230Y\240o\260Q\260f\270F\300*\310A\310Q\340\010\017\320\017(\250\001\250\026\250{\270'\300\026\300{\320RS\340\r\016\330\014/\250q\260\001\200\001\360\014\000\005\014\2105\220\007\220q\230\001\330\004\016\210a\340\t\n\330\010\021\320\021%\240Q\240a\340\004\005\330\010\013\2106\220\021\330\014\026\220f\230F\240(\250'\260\021\260!\330\014\036\230m\2501\250A\330\014\022\220*\230A\230Y\240o\260Q\260f\270F\300*\310A\310Q\340\010\017\210v\320\025%\240W\250A\250Q\340\r\016\330\014,\250A\250Q\200\001\360\014\000\005\014\2105\220\007\220q\230\001\330\004\016\210a\340\t\n\330\010\021\320\021'\240q\250\001\340\004\005\330\010\013\2106\220\021\330\014\026\220f\230F\240(\250'\260\021\260!\330\014\036\230m\2501\250A\330\014\022\220*\230A\230Y\240o\260Q\260f\270F\300*\310A\310Q\340\010\017\210v\220^\2407\250!\2501\340\r\016\330\014.\250a\250q\200\001\360\014\000\005\014\2105\220\007\220q\230\001\330\004\016\210a\340\t\n\330\010\021\220\036\230q\240\001\340\004\005\330\010\013\2106\220\021\330\014\026\220f\230F\240(\250'\260\021\260!\330\014\036\230m\2501\250A\330\014\022\220*\230A\230Y\240o\260Q\260f\270F\300*\310A\310Q\340\010\017\210v\220[\240\007\240q\250\001\340\r\016\330\014&\240a\240q\200\001\360\020\000\005\014\2105\220\007\220q\230\001\330\004\026\220m\2401\240A\330\004\016\210a\340\004\013\320\013(\250\001\340\t\n\330\010\021\320\021#\2401\240I\250Q\340\004\005\330\010\013\2106\220\026\220w\230a\330\014\024\220K\230q\240\006\240e\2501\330\014\020\220\005\220U\230!\2306\240\025\240a\330\020\027\220v\230X\240Y\250a\250v\260W\270D\300\001\330\020\031\230\021\230!\330\020 \240\001\240\027\250\003\2501\330\014\023\2201\330\r\023\2207""\230#\230Q\330\014\023\2201\340\014\026\220f\230F\240(\250'\260\021\260!\330\014\022\220*\230A\230Y\240o\260Q\260f\270F\300*\310A\310Q\340\010$\240A\240Q\200\001\360\026\000\005\014\2105\220\007\220q\230\001\330\004\026\220m\2401\240A\330\004\016\210a\340\t\n\330\010\022\220-\230q\240\001\340\004\005\330\010\013\2107\220!\330\014\026\220g\230V\2408\2507\260!\2601\330\014\022\220*\230A\230Y\240o\260Q\260g\270V\300:\310Q\310a\340\r\016\330\014\032\320\0327\260q\270\006\270g\300U\310!\3308C\3007\310%\310q\340\010\021\220\032\2301\230K\240q\340\010\014\210E\220\025\220a\220{\240!\330\014\031\230\033\240G\2501\250A\330\014\024\320\0248\270\001\270\021\270!\3309C\3001\330\014\025\320\0259\270\021\270!\2701\330:D\300A\340\014\024\220E\230\021\230/\250\021\250*\260I\270_\310A\310Z\320W[\320[\\\320\\]\330\032\037\230u\240G\2501\250L\270\006\270c\300\032\3101\330\032 \240\005\240W\250A\250Q\330\014\025\220Q\220a\330\014\033\2301\230H\240C\240q\340\r\016\330\0140\260\001\260\035\270a\340\r\016\330\014%\240Q\240a\340\004\013\2101\200\001\330\025\026\330\025\026\330\025\026\330\025\026\330\025\026\360\014\000\0058\260q\270\t\320A\\\320\\]\3308F\300a\3308E\300Q\3308D\300A\3308H\310\001\3308I\310\021\3308M\310Q\340\004\033\2301\230J\240a\240t\2507\260.\300\001\300\024\300Q\330\t\n\330\010\023\320\0231\260\021\260&\270\001\340\004\005\330\010\013\2108\2201\330\014\026\220h\230f\240H\250G\2601\260A\330\014\022\220,\230a\230y\250\010\260\006\260a\340\010\017\210x\220v\230W\240A\240Q\340\r\016\330\014(\250\001\250\021\320\000\025\320\025,\250A\360\034\000\005\022\220\021\360\006\000\005*\250\021\360\014\000\005\014\2105\220\007\220q\230\001\330\004\016\210a\340\t\n\330\010\013\2101\330\014\027\320\0271\260\021\260!\340\014\027\320\0272\260!\2601\340\004\005\330\010\013\2108\2201\330\014\026\220h\230f\240H\250G\2601\260A\330\014\036\230m\2501\250A\330\014\022\220*\230A\230Y\240o\260Q\260h\270f\300J\310a\310q\340\010\021\220\021\330\010\013\2101\330\014\036\230m\2501\250A\330\010\016""\210b\220\002\220(\230!\330\014\024\220H\230F\240!\2402\240Q\330\014\022\220(\230&\240\001\240\022\240?\260\"\260H\270F\300!\3002\300Q\330\014\023\2204\220q\230\006\230d\240'\250\021\250!\330\014\017\210q\330\020\036\230o\250Q\250a\330\020%\240S\250\001\250\026\250r\260\023\260A\260T\270\027\300\001\330\020\034\230L\250\002\250#\250Q\250d\260'\270\021\330\020\026\220g\230V\2401\240L\260\002\3202F\300a\340\020\026\220g\230Q\230d\240&\250\001\330\014\021\220\021\330\010\017\210u\220A\220Q\340\r\016\330\014&\240a\240q\200\001\360\n\000\005\025\220A\340\004\013\2105\220\007\220q\230\001\330\004\026\220m\2401\240A\330\004\016\210a\340\t\n\330\010\023\320\0236\260a\260q\340\004\005\330\010\013\2108\2201\330\014\026\220h\230f\240H\250G\2601\260A\330\014\022\220*\230A\230Y\240o\260Q\260h\270f\300J\310a\310q\340\010\021\220\021\330\010\016\210b\220\002\220(\230!\330\014\022\220'\230\021\230'\240\021\330\020\037\230q\240\010\250\t\260\021\260\"\260A\330\020\030\230\t\240\021\240\"\240A\330\020\030\230\t\240\021\240\"\240A\330\020\030\230\t\240\021\240\"\240D\250\007\250q\260\001\340\014\021\220\021\330\010\017\210u\220A\220Q\340\r\016\330\0141\260\021\260!\200A\330\010\022\220$\220e\2301\230A\330\010\013\2103\210a\210t\2207\230\"\230A\330\014\027\220t\2305\240\001\240\021\330\014\017\210y\230\007\230q\330\020\033\320\033+\2501\250A\330\010\017\210q\200A\330\010\022\220$\220e\2301\230A\330\010\013\2103\210a\210t\2207\230\"\230A\330\014\027\220t\2305\240\001\240\021\330\014\017\210y\230\007\230q\330\020\033\230=\250\001\250\021\330\010\017\210q\200\001\360\010\000\005\016\210T\320\021!\240\024\240Q\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230?\250'\260\021\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.\250d\260!\2607\270+\300Q\200\001\360\006\000\005\017\210a\330\004\013\2108\2206\230\021\230)\2401\330\004\014\210G\2201\200\001\340\004\037\230q\320 0""\260\013\270;\300k\320QR\330\004\023\220=\240\010\250\001\250\021\330\004\007\200|\2207\230!\330\010/\250q\3200@\300\016\310a\330\004\013\2101";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 466; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 16) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 466; i < 481; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 481; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 466;
      for (Py_ssize_t i=0; i<15; ++i) {
        #if PY_VERSION_HEX >= 0x030F0000
        PyUnstable_SetImmortal(table[i]);
        #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
        #if PY_VERSION_HEX < 0x030E0000
        if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
        #else
        if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
        #endif
        {
          Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
        }
        #else
        if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
    int8_t const cint_constants_1[] = {0};
    int32_t const cint_constants_4[] = {37136258L};
    for (int i = 0; i < 2; i++) {
      numbertab[i] = PyLong_FromLong((i < 1 ? cint_constants_1[i - 0] : cint_constants_4[i - 1]));
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<2; ++i) {
      #if PY_VERSION_HEX >= 0x030F0000
      PyUnstable_SetImmortal(table[i]);
      #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
      }
      #else
      if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 3;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 5;
    unsigned int flags : 10;
    unsigned int first_line : 10;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 28};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_location};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_A_e1A_3at7_A_t5_y_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 40};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_location};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_A_e1A_3at7_A_t5_y_q_1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_Q_G1F_a_vWE_Q_q_t_q_d_7_WA_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 265};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_version, __pyx_mstate->__pyx_n_u_major, __pyx_mstate->__pyx_n_u_minor};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_get_postgresql_version, __pyx_mstate->__pyx_kp_b_iso88591_a_86_1_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parsed, __pyx_mstate->__pyx_n_u_mctx, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_offset_to_index, __pyx_mstate->__pyx_n_u_stmts, __pyx_mstate->__pyx_n_u_item, __pyx_mstate->__pyx_n_u_message};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_parse_sql, __pyx_mstate->__pyx_kp_b_iso88591_5_q_m1A_a_1IQ_6_wa_Kq_e1_U_6_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 307};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parsed, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_offset_to_index};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_parse_sql_json, __pyx_mstate->__pyx_kp_b_iso88591_5_q_a_q_6_fF_m1A_AYoQfF_AQ_v_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 331};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parsed, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_cursorpos, __pyx_mstate->__pyx_n_u_offset_to_index};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_parse_sql_protobuf, __pyx_mstate->__pyx_kp_b_iso88591_5_q_a_6_fF_fA_m1A_AYoQfF_AQ_RS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 356};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parsed, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_offset_to_index};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_parse_plpgsql_json, __pyx_mstate->__pyx_kp_b_iso88591_5_q_a_q_6_fF_m1A_AYoQfF_AQ_v_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 380};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_offset_to_index};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_fingerprint, __pyx_mstate->__pyx_kp_b_iso88591_5_q_a_Qa_6_fF_m1A_AYoQfF_AQ_v_W, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 404};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stmts, __pyx_mstate->__pyx_n_u_with_parser, __pyx_mstate->__pyx_n_u_only_slices, __pyx_mstate->__pyx_n_u_splitted, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_offset_to_index, __pyx_mstate->__pyx_n_u_stmt, __pyx_mstate->__pyx_n_u_start_index, __pyx_mstate->__pyx_n_u_leading_whitespace, __pyx_mstate->__pyx_n_u_end_index, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_split, __pyx_mstate->__pyx_kp_b_iso88591_A_5_q_a_1_1_2_1_81_hfHG1A_m1A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 470};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_comments, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_offset_to_index, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_comments, __pyx_mstate->__pyx_kp_b_iso88591_A_5_q_m1A_a_6aq_81_hfHG1A_AYoQh, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 504};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_protobuf, __pyx_mstate->__pyx_n_u_pretty_print, __pyx_mstate->__pyx_n_u_indent_size, __pyx_mstate->__pyx_n_u_max_line_length, __pyx_mstate->__pyx_n_u_trailing_newline, __pyx_mstate->__pyx_n_u_commas_start_of_line, __pyx_mstate->__pyx_n_u_tree, __pyx_mstate->__pyx_n_u_deparsed, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_opts, __pyx_mstate->__pyx_n_u_message};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_deparse_protobuf, __pyx_mstate->__pyx_kp_b_iso88591_8q_A_8Fa8EQ8DA8H_8I_8MQ_1Jat7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 541};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_scanned, __pyx_mstate->__pyx_n_u_scan_result, __pyx_mstate->__pyx_n_u_scan_token, __pyx_mstate->__pyx_n_u_tkind, __pyx_mstate->__pyx_n_u_kwkind, __pyx_mstate->__pyx_n_u_cstring, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_utf8, __pyx_mstate->__pyx_n_u_offset_to_index, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_token};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pglast_parser_pyx, __pyx_mstate->__pyx_n_u_scan, __pyx_mstate->__pyx_kp_b_iso88591_5_q_m1A_a_q_7_gV87_1_AYoQgV_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_Displacements, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _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 (used by PyObjectGetAttrStrNoError) */
#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);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    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) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    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);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *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
}
#endif

/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#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);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    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;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n)))
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* PyDictVersioning (used by GetModuleGlobalName) */
#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_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall (used by PyObjectFastCall) */
#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(" 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 (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" 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 */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    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]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(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;
}

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

/* RaiseException */
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 PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        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);
        }
#else
        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);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        Py_INCREF(src[i]);
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
    }
    return res;
}
#elif 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) {
        return __Pyx_NewRef(__pyx_mstate_global->__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 (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    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 (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    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 (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            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));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    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 = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
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);
}

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        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);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    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)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    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;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* 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,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && 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)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    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)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || 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 || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __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_COMPILING_IN_LIMITED_API
    *kind   = 0;
    *length = PyUnicode_GetLength(ustring);
    *data   = (void*)ustring;
#else
    if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return -1;
    *kind   = PyUnicode_KIND(ustring);
    *length = PyUnicode_GET_LENGTH(ustring);
    *data   = PyUnicode_DATA(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) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

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

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
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;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_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);
#endif
}

/* divmod_int */
static CYTHON_INLINE __pyx_ctuple_long__and_long __Pyx_divmod_int_long(long a, long b) {
    long q, r;
    if (unlikely(b == 0)) {
        
        PyErr_SetString(PyExc_ZeroDivisionError, "division by zero");
        
        return __Pyx_divmod_ERROR_VALUE_int_long;
    } else if (a == 0) {
        q = 0;
        r = 0;
    } else if ((a < 0) != (b < 0)) {
        q = a / b;
        r = a - q * b;
        long adapt_python = ((r != 0) & ((r < 0) ^ (b < 0)));
        q -= adapt_python;
        r += adapt_python * b;
    }
    else {
        q = a / b;
        r = a % b;
    }
    __pyx_ctuple_long__and_long c_result = {q, r};
    return c_result;
}

/* 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 = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    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;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    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 (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    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);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* 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);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #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 (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
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

/* decode_c_bytes (used by decode_bytes) */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, 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)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_mstate_global->__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);
    }
}

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* CallTypeTraverse */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                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);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                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;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* PyObjectCallNoArg (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
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))
#else
        #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
#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_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __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;
}
#endif

/* PyObjectCallMethod0 (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    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;
#endif
}

/* ValidateBasesTuple (used by PyType_Ready) */
#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;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(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);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || 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;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    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 !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 (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__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_mstate_global->__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;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !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_mstate_global->__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
}

/* DelItemOnTypeDict (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_DelItem(tp_dict, k);
    if (likely(!result)) PyType_Modified(tp);
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_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_mstate_global->__pyx_n_u_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_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_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_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_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
            if (likely(reduce_cython)) {
                ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_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_mstate_global->__pyx_n_u_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_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_GetFullyQualifiedName((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;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_8
#define __PYX_HAVE_RT_ImportType_3_2_8
static PyTypeObject *__Pyx_ImportType_3_2_8(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_8 check_size)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && 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 !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    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_3_2_8 &&
            ((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_3_2_8 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* 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_mstate_global->__pyx_kp_u__2);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            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, "cannot import name %S", name);
    }
    return value;
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
#if CYTHON_ASSUME_SAFE_SIZE
    size_bases = PyTuple_GET_SIZE(bases);
#else
    size_bases = PyTuple_Size(bases);
    if (size_bases < 0) return NULL;
#endif
    for (i = 0; i < size_bases; i++) {
#if CYTHON_AVOID_BORROWED_REFS
        Py_CLEAR(base);
#endif
#if CYTHON_ASSUME_SAFE_MACROS
        base = PyTuple_GET_ITEM(bases, i);
#else
        base = PyTuple_GetItem(bases, i);
        if (!base) goto error;
#endif
#if CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(base);
#endif
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_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++) {
                PyObject *base_from_list;
#if CYTHON_ASSUME_SAFE_MACROS
                base_from_list = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base_from_list);
                Py_INCREF(base_from_list);
#else
                base_from_list = PyTuple_GetItem(bases, j);
                if (!base_from_list) goto error;
                Py_INCREF(base_from_list);
                if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
#endif
            }
        }
#if CYTHON_ASSUME_SAFE_SIZE
        j = PyList_GET_SIZE(new_bases);
#else
        j = PyList_Size(new_bases);
        if (j < 0) goto error;
#endif
        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);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return result;
error:
    Py_XDECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_SIZE
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
        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) {
        metaclass = &PyType_Type;
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
    PyDict_SetDefaultRef(d, key, default_value, &value);
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : 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;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
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);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
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;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    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 = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        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:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    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)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __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_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
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_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_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 PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
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;
}
#endif
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 = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_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_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    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_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
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_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists((PyObject*) op, Py_None) < 0)) return -1;
    return 0;
}
static int
__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
    /* Return 1 if the function dict exists, 0 otherwise.  This cannot fail:
     * _PyObject_GetDictPtr() may clear errors internally, but never reports them. */
#if CYTHON_COMPILING_IN_PYPY
    *dict = PyObject_GenericGetDict(op_in, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
    *dict = ((__pyx_CyFunctionObject*) op_in)->func_dict;
#else
    PyObject **dictptr = _PyObject_GetDictPtr(op_in);
    *dict = likely(dictptr) ? *dictptr : NULL;
#endif
    return *dict ? 1 : 0;
}
static int
__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
    PyObject *dict;
    int dict_found;
    *annotate = NULL;
    dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
    if (!dict_found) return 0;
    return __Pyx_PyDict_GetItemRef(dict, __pyx_mstate_global->__pyx_n_u_annotate, annotate);
}
static int
__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
    PyObject *dict;
    int dict_found;
    dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
    if (!dict_found) return 0;
    return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
}
static int
__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
    PyObject *dict;
    int result;
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    dict = __Pyx_CyFunction_get_dict((__pyx_CyFunctionObject*) op_in, NULL);
#else
    dict = PyObject_GenericGetDict(op_in, NULL);
#endif
    if (unlikely(!dict)) return -1;
    result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
    Py_DECREF(dict);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(PyObject *op_in, void *context) {
    PyObject *annotate = NULL;
    PyObject *result = NULL;
    __pyx_CyFunctionObject *op = (__pyx_CyFunctionObject*) op_in;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op_in);
    result = __Pyx_XNewRef(op->func_annotations);
    __Pyx_END_CRITICAL_SECTION();
    if (result) return result;
    if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
    if (!annotate || annotate == Py_None) {
        Py_XDECREF(annotate);
        __Pyx_BEGIN_CRITICAL_SECTION(op_in);
        result = __Pyx_CyFunction_get_annotations_locked(op);
        __Pyx_END_CRITICAL_SECTION();
        return result;
    }
    PyObject *format = PyLong_FromLong(1L);  // annotationlib.Format.VALUE
    if (likely(format)) {
        result = __Pyx_PyObject_CallOneArg(annotate, format);
        Py_DECREF(format);
    }
    Py_DECREF(annotate);
    if (unlikely(!result)) return NULL;
    if (unlikely(!PyDict_Check(result))) {
        PyErr_SetString(PyExc_TypeError, "__annotate__ must return a dict");
        Py_DECREF(result);
        return NULL;
    }
    __Pyx_BEGIN_CRITICAL_SECTION(op_in);
    __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *args) {
    CYTHON_UNUSED_VAR(args);
    if (unlikely(!self)) {
        PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument");
    }
    Py_XINCREF(self);
    return self;
}
static PyMethodDef __Pyx_CyFunction_annotate_method = {
    "__annotate__",
    (PyCFunction)(void (*)(void))__Pyx_CyFunction_annotate_impl,
    METH_VARARGS,
    "Placeholder __annotate__ function to allow 'functools.wraps' to work "
    "on Cython functions."
};
static PyObject *
__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) {
    PyObject *annotate = NULL;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
    if (annotate) return annotate;
    PyObject *annotations = __Pyx_CyFunction_get_annotations(op_in, NULL);
    if (unlikely(!annotations)) return NULL;
    PyObject *method = PyCFunction_New(
        &__Pyx_CyFunction_annotate_method,
        annotations);
    Py_DECREF(annotations);
    return method;
}
static int
__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted");
        return -1;
    }
    if (unlikely(value != Py_None && !PyCallable_Check(value))) {
        PyErr_SetString(PyExc_TypeError, "__annotate__ must be callable or None");
        return -1;
    }
    if (value != Py_None) {
        __pyx_CyFunctionObject *op = (__pyx_CyFunctionObject*) op_in;
        __Pyx_BEGIN_CRITICAL_SECTION(op_in);
        Py_CLEAR(op->func_annotations);
        __Pyx_END_CRITICAL_SECTION();
    }
    return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__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)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#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) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    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 = 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);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    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 || CYTHON_COMPILING_IN_LIMITED_API
    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);
    Py_CLEAR(m->defaults);
    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)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_annotations);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (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(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_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;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        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;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        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 && CYTHON_VECTORCALL
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)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        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;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return 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;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return 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;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))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;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
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 CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    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_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyObjectCall2Args (used by Py3ClassCreate) */
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 (used by Py3ClassCreate) */
#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);
    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_mstate_global->__pyx_n_u_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_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_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, mkw);
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
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 __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            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(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#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 (c_line) {
        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;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    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_mstate_global->__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;\
    }

/* CheckUnpickleChecksum */
static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
    PyObject *pickle_module = PyImport_ImportModule("pickle");
    if (unlikely(!pickle_module)) return;
    PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError");
    Py_DECREF(pickle_module);
    if (unlikely(!pickle_error)) return;
    if (checksum2 == checksum1) {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))",
            checksum, checksum1, members);
    } else if (checksum3 == checksum2) {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))",
            checksum, checksum1, checksum2, members);
    } else {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))",
            checksum, checksum1, checksum2, checksum3, members);
    }
    Py_DECREF(pickle_error);
}
static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
    int found = 0;
    found |= checksum1 == checksum;
    found |= checksum2 == checksum;
    found |= checksum3 == checksum;
    if (likely(found))
        return 0;
    __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members);
    return -1;
}

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_PyLong_From_int(s.type); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_type, member) < 0)) goto bad;
  Py_DECREF(member);
  return res;
  bad:
  Py_XDECREF(member);
  Py_DECREF(res);
  return NULL;
}
/* UnicodeAsUCS4 */
static void __Pyx_PyUnicode_AsPy_UCS4_error(Py_ssize_t length) {
    if (likely(length >= 0)) {
        PyErr_Format(PyExc_ValueError,
                     "only single character unicode strings can be converted to Py_UCS4, "
                     "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
    }
}
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
    Py_ssize_t length = __Pyx_PyUnicode_GET_LENGTH(x);
    if (unlikely(length != 1)) {
        __Pyx_PyUnicode_AsPy_UCS4_error(length);
        return (Py_UCS4)-1;
    }
    return __Pyx_PyUnicode_READ_CHAR(x, 0);
}

/* PyObjectVectorCallKwBuilder (used by CIntToPy) */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    Py_INCREF(key);
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned long __Pyx_PyLong_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 (unlikely(!PyLong_Check(x))) {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (unsigned long) -1;
        val = __Pyx_PyLong_As_unsigned_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                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 && PY_VERSION_HEX < 0x030C00A7
        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))
        } else if ((sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                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))
        } else if ((sizeof(unsigned long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        unsigned long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (unsigned long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (unsigned long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (unsigned long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (unsigned long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(unsigned long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((unsigned long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(unsigned long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((unsigned long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((unsigned long) 1) << (sizeof(unsigned long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (unsigned long) -1;
        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_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyLong_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 (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                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 && PY_VERSION_HEX < 0x030C00A7
        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))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                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))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        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_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_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 (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                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 && PY_VERSION_HEX < 0x030C00A7
        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))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                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))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        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_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(CmdType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(CmdType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(CmdType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CmdType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(QuerySource) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(QuerySource) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(QuerySource),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(QuerySource));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(bool) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(bool) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(bool),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(bool));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(OverridingKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(OverridingKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(OverridingKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(OverridingKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(LimitOption) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(LimitOption) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(LimitOption),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(LimitOption));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ParseLoc(ParseLoc value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ParseLoc neg_one = (ParseLoc) -1, const_zero = (ParseLoc) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ParseLoc) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(ParseLoc) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(ParseLoc) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ParseLoc) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(ParseLoc) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ParseLoc),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ParseLoc));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(A_Expr_Kind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(A_Expr_Kind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(A_Expr_Kind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(A_Expr_Kind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(RoleSpecType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(RoleSpecType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(RoleSpecType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(RoleSpecType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(CoercionForm) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(CoercionForm) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(CoercionForm),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CoercionForm));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(SortByDir) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(SortByDir) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(SortByDir),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SortByDir));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(SortByNulls) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(SortByNulls) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(SortByNulls),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SortByNulls));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int16_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(DefElemAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(DefElemAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(DefElemAction),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(DefElemAction));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(LockClauseStrength) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(LockClauseStrength) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(LockClauseStrength),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(LockClauseStrength));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(LockWaitPolicy) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(LockWaitPolicy) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(LockWaitPolicy),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(LockWaitPolicy));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(XmlOptionType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(XmlOptionType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(XmlOptionType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(XmlOptionType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(PartitionRangeDatumKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(PartitionRangeDatumKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PartitionRangeDatumKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PartitionRangeDatumKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(RTEKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(RTEKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(RTEKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(RTEKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(JoinType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(JoinType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JoinType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JoinType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(WCOKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(WCOKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(WCOKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(WCOKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(GroupingSetKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(GroupingSetKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(GroupingSetKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(GroupingSetKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(OnConflictAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(OnConflictAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(OnConflictAction),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(OnConflictAction));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(CTEMaterialize) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(CTEMaterialize) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(CTEMaterialize),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CTEMaterialize));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MergeMatchKind(MergeMatchKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const MergeMatchKind neg_one = (MergeMatchKind) -1, const_zero = (MergeMatchKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(MergeMatchKind) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(MergeMatchKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(MergeMatchKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(MergeMatchKind) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(MergeMatchKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(MergeMatchKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(MergeMatchKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ReturningOptionKind(ReturningOptionKind value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ReturningOptionKind neg_one = (ReturningOptionKind) -1, const_zero = (ReturningOptionKind) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ReturningOptionKind) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(ReturningOptionKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(ReturningOptionKind) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ReturningOptionKind) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(ReturningOptionKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ReturningOptionKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ReturningOptionKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonExprOp(JsonExprOp value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonExprOp neg_one = (JsonExprOp) -1, const_zero = (JsonExprOp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonExprOp) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonExprOp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonExprOp) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonExprOp) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonExprOp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonExprOp),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonExprOp));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonWrapper(JsonWrapper value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonWrapper neg_one = (JsonWrapper) -1, const_zero = (JsonWrapper) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonWrapper) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonWrapper) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonWrapper) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonWrapper) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonWrapper) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonWrapper),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonWrapper));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonQuotes(JsonQuotes value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonQuotes neg_one = (JsonQuotes) -1, const_zero = (JsonQuotes) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonQuotes) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonQuotes) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonQuotes) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonQuotes) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonQuotes) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonQuotes),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonQuotes));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonTableColumnType(JsonTableColumnType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonTableColumnType neg_one = (JsonTableColumnType) -1, const_zero = (JsonTableColumnType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonTableColumnType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonTableColumnType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonTableColumnType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonTableColumnType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonTableColumnType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonTableColumnType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonTableColumnType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(SetOperation) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(SetOperation) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(SetOperation),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SetOperation));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(ObjectType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(ObjectType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ObjectType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ObjectType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterTableType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterTableType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(AlterTableType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AlterTableType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(DropBehavior) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(DropBehavior) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(DropBehavior),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(DropBehavior));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(GrantTargetType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(GrantTargetType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(GrantTargetType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(GrantTargetType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(VariableSetKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(VariableSetKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(VariableSetKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(VariableSetKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(OnCommitAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(OnCommitAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(OnCommitAction),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(OnCommitAction));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(ConstrType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(ConstrType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ConstrType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ConstrType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(ImportForeignSchemaType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(ImportForeignSchemaType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ImportForeignSchemaType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ImportForeignSchemaType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(RoleStmtType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(RoleStmtType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(RoleStmtType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(RoleStmtType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(FetchDirection) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(FetchDirection) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(FetchDirection),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(FetchDirection));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(TransactionStmtKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(TransactionStmtKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(TransactionStmtKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(TransactionStmtKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(ViewCheckOption) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(ViewCheckOption) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ViewCheckOption),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ViewCheckOption));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(DiscardMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(DiscardMode) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(DiscardMode),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(DiscardMode));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(ReindexObjectType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(ReindexObjectType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ReindexObjectType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ReindexObjectType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(CoercionContext) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(CoercionContext) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(CoercionContext),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CoercionContext));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterTSConfigType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterTSConfigType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(AlterTSConfigType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AlterTSConfigType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(PublicationObjSpecType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(PublicationObjSpecType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PublicationObjSpecType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PublicationObjSpecType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterPublicationAction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterPublicationAction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(AlterPublicationAction),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AlterPublicationAction));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterSubscriptionType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(AlterSubscriptionType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(AlterSubscriptionType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AlterSubscriptionType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_TableFuncType(TableFuncType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const TableFuncType neg_one = (TableFuncType) -1, const_zero = (TableFuncType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(TableFuncType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(TableFuncType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(TableFuncType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(TableFuncType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(TableFuncType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(TableFuncType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(TableFuncType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_VarReturningType(VarReturningType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const VarReturningType neg_one = (VarReturningType) -1, const_zero = (VarReturningType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(VarReturningType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(VarReturningType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(VarReturningType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(VarReturningType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(VarReturningType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(VarReturningType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(VarReturningType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(ParamKind) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(ParamKind) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ParamKind),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ParamKind));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(AggSplit) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(AggSplit) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(AggSplit),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AggSplit));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(BoolExprType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(BoolExprType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(BoolExprType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(BoolExprType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(SubLinkType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(SubLinkType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(SubLinkType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SubLinkType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CompareType(CompareType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CompareType neg_one = (CompareType) -1, const_zero = (CompareType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CompareType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(CompareType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(CompareType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CompareType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(CompareType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(CompareType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CompareType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(MinMaxOp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(MinMaxOp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(MinMaxOp),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(MinMaxOp));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(SQLValueFunctionOp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(SQLValueFunctionOp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(SQLValueFunctionOp),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SQLValueFunctionOp));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(XmlExprOp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(XmlExprOp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(XmlExprOp),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(XmlExprOp));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonFormatType(JsonFormatType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonFormatType neg_one = (JsonFormatType) -1, const_zero = (JsonFormatType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonFormatType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonFormatType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonFormatType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonFormatType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonFormatType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonFormatType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonFormatType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonEncoding(JsonEncoding value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonEncoding neg_one = (JsonEncoding) -1, const_zero = (JsonEncoding) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonEncoding) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonEncoding) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonEncoding) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonEncoding) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonEncoding) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonEncoding),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonEncoding));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonConstructorType(JsonConstructorType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonConstructorType neg_one = (JsonConstructorType) -1, const_zero = (JsonConstructorType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonConstructorType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonConstructorType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonConstructorType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonConstructorType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonConstructorType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonConstructorType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonConstructorType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonValueType(JsonValueType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonValueType neg_one = (JsonValueType) -1, const_zero = (JsonValueType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonValueType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonValueType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonValueType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonValueType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonValueType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonValueType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonValueType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_JsonBehaviorType(JsonBehaviorType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const JsonBehaviorType neg_one = (JsonBehaviorType) -1, const_zero = (JsonBehaviorType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(JsonBehaviorType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonBehaviorType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(JsonBehaviorType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(JsonBehaviorType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(JsonBehaviorType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(JsonBehaviorType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(JsonBehaviorType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(NullTestType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(NullTestType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(NullTestType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(NullTestType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_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 PyLong_FromLong((long) value);
        } else if (sizeof(BoolTestType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } 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 PyLong_FromLong((long) value);
        } else if (sizeof(BoolTestType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(BoolTestType),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(BoolTestType));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyLong_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 (unlikely(!PyLong_Check(x))) {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyLong_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                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 && PY_VERSION_HEX < 0x030C00A7
        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))
        } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                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))
        } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        size_t val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (size_t) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (size_t) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (size_t) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (size_t) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((size_t) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((size_t) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (size_t) -1;
        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;
}

/* ObjectAsUCS4 */
static void __Pyx__PyObject_AsPy_UCS4_raise_error(long ival) {
   if (ival < 0) {
       if (!PyErr_Occurred())
           PyErr_SetString(PyExc_OverflowError,
                           "cannot convert negative value to Py_UCS4");
   } else {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to Py_UCS4");
   }
}
static Py_UCS4 __Pyx__PyObject_AsPy_UCS4(PyObject* x) {
   long ival;
   ival = __Pyx_PyLong_As_long(x);
   if (unlikely(!__Pyx_is_valid_index(ival, 1114111 + 1))) {
       __Pyx__PyObject_AsPy_UCS4_raise_error(ival);
       return (Py_UCS4)-1;
   }
   return (Py_UCS4)ival;
}

/* PyObjectCallMethod1 */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* UpdateUnpickledDict */
static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
    PyObject *state_dict = __Pyx_PySequence_ITEM(state, index);
    if (unlikely(!state_dict)) {
        return -1;
    }
    int non_empty = PyObject_IsTrue(state_dict);
    if (non_empty == 0) {
        Py_DECREF(state_dict);
        return 0;
    } else if (unlikely(non_empty == -1)) {
        return -1;
    }
    PyObject *dict;
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    dict = PyObject_GetAttrString(obj, "__dict__");
    #else
    dict = PyObject_GenericGetDict(obj, NULL);
    #endif
    if (unlikely(!dict)) {
        Py_DECREF(state_dict);
        return -1;
    }
    int result;
    if (likely(PyDict_CheckExact(dict))) {
        result = PyDict_Update(dict, state_dict);
    } else {
        PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict);
        if (likely(obj_result)) {
            Py_DECREF(obj_result);
            result = 0;
        } else {
            result = -1;
        }
    }
    Py_DECREF(state_dict);
    Py_DECREF(dict);
    return result;
}
static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
    Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(state_size == -1)) return -1;
    #endif
    if (state_size <= index) {
        return 0;
    }
    return __Pyx__UpdateUnpickledDict(obj, state, index);
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__3);
    }
    goto done;
}
#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);
}
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);
    }
}
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);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        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

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __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 *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static 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) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !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
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) goto bad;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
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_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#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_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        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_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    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;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  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 (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      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 = PyLong_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);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
